A Developer is creating a serverless website with content that includes HTML files, images, videos, and JavaScript (client-side scripts). Which combination of services should the Developer use to create the website?
WHY A IS True? | CONCEPT: Amazon S3 and Amazon CloudFront |
You can use Amazon S3 to host a static website. On a static website, individual webpages include static content. They might also contain client-side scripts. To host a static website on Amazon S3, you configure an Amazon S3 bucket for website hosting and then upload your website content to the bucket. When you configure a bucket as a static website, you set permissions, add/upload an index document and enter the name of the index document when enabling static website hosting. To get content closer to users for better performance you can also use Amazon CloudFront in front of the S3 static website. |
|
---|---|---|---|
WHY B IS False? | CONCEPT: Amazon ECS and Redis |
These services are also not serverless. Also Redis is an in-memory cache and is typically placed in front of a database, not a container. |
|
WHY C IS False? | CONCEPT: Amazon EC2 and Amazon ElastiCache |
The website is supposed to be serverless and neither of these services are serverless as they both use Amazon EC2 instances. |
|
WHY D IS False? | CONCEPT: AWS Lambda and Amazon API Gateway |
These are both serverless services however for serving content such as HTML files, images, videos, and client-side JavaScript, Amazon S3 and CloudFront are more appropriate & cost efficient. |
|
Short Trick |
1."serverless website" which redirect us to option A & D as option B & C are not serverless services. 2."HTML files, images, videos, and JavaScript (client-side scripts)."redirect us to Amazon S3 as it is very easy to configure S3 bucket as a static website, which can include HTML, images,videos, client-side Scripts. ALWAYS CHOOSE COST EFFICIENT SERVICES IF NOT TOLD SPECIFICALLY IN QUESTION |
||
References: | REFERNCED DOCS |
A Developer is writing a web application that allows users to view images from an Amazon S3 bucket. The users will log in with their Amazon login, as well as Facebook and/or Google accounts. How can the Developer provide this authentication capability?
WHY A IS True? | CONCEPT: Amazon Cognito identity pools |
Amazon Cognito identity pools (federated identities) enable you to create unique identities for your users and federate them with identity providers. With an identity pool, you can obtain temporary, limited-privilege AWS credentials to access other AWS services. Amazon Cognito identity pools support the following identity providers: Public providers: |
|
---|---|---|---|
WHY B IS False? | CONCEPT: Security Assertion Markup Language (SAML) |
Security Assertion Markup Language (SAML) is an open standard that allows identity providers (IdP) to pass authorization credentials to service providers (SP). SAML is used with directory sources such as Microsoft Active Directory, not Facebook or Google. |
|
WHY C IS False? | CONCEPT: Best Practice in AWS IAM |
This is really insecure and against best practice. Always try to avoid embedding access keys in application code. |
|
WHY D IS False? | CONCEPT: AWS (AWS Security Token Service)STS AssumeRole |
AWS Security Token Service (AWS STS) is a web service that enables you to request temporary, limited-privilege credentials for AWS Identity and Access Management (IAM) users or for users that you authenticate (federated users).So, STS Assume Role can do this but you cannot do this directly through a Facebook or Google login. For this scenario, a Cognito Identity Pool is required to authenticate the user from the social IdP and provide access to the AWS services. |
|
Short Trick |
1."authentication capability" which redirect us to Amazon Cognito & STS AssumeRole 2."as well as Facebook and/or Google accounts" which redirect us to Amazon Cognito with web identity federation, as STS can't used to login through FB & Google . |
||
References: | REFERNCED DOCS |
A company has implemented AWS CodePipeline to automate its release pipelines. The Development team is writing an AWS Lambda function that will send notifications for state changes of each of the actions in the stages. Which steps must be taken to associate the Lambda function with the event source?
WHY A IS False? | CONCEPT: Amazon CloudWatch Alarms |
CloudWatch Alarms collects standard metrics from your instances, S3 buckets, almost all the AWS services. You can add a threshold that triggers an action. For example, if your S3 bucket object count is greater than 100 then trigger a Lambda function to process the objects. CloudWatch Alarms is used for monitoring state changes. To understand key differences between Cloudwatch alarms & CloudWatch events: https://kaustubhsharma.com/blog/cloudwatch-events-vs-cloudwatch-alarms |
|
---|---|---|---|
WHY B IS True? | CONCEPT: Amazon CloudWatch Events |
Amazon CloudWatch Events help you to respond to state changes in your AWS resources. When your resources change state, they automatically send events into an event stream. You can create rules that match selected events in the stream and route them to your AWS Lambda function to take action. AWS CodePipeline can be configured as an event source in CloudWatch Events and can then send notifications using a service such as Amazon SNS. Therefore, the best answer is to create an Amazon CloudWatch Events rule that uses CodePipeline as an event source. To understand key differences between Cloudwatch alarms & CloudWatch events: https://kaustubhsharma.com/blog/cloudwatch-events-vs-cloudwatch-alarms |
|
WHY C IS False? | CONCEPT: CodePipeline |
AWS CodePipeline is a fully managed continuous delivery service that helps you automate your release pipelines for fast and reliable application and infrastructure updates. CodePipeline automates the build, test, and deploy phases of your release process every time there is a code change, based on the release model you define. This enables you to rapidly and reliably deliver features and updates. CodePipeline cannot be configured as a trigger for Lambda. To know about services that can be used as triggers for Lambda: https://kaustubhsharma.com/blog/Trigger-for-Lambda-functions |
|
WHY D IS False? | CONCEPT: CodePipeline as trigger for Lambda |
CodePipeline cannot be configured as a trigger for Lambda. To know about services that can be used as triggers for Lambda: https://kaustubhsharma.com/blog/Trigger-for-Lambda-functions |
|
Short Trick |
Many got confused when they saw "send notifications" in question which might direct you towards CW Alarms, but that's the problem. Here, AWS Lambda will send notifications.The problem is that we have to trigger this Lambda Function as state changes, which means we have to respond as state changes. Main keyword is "associate the Lambda function with the event source". One should know CodePipeline cannot be configured as a trigger for Lambda. Therefore, the best answer is to create an Amazon CloudWatch Events rule that uses CodePipeline as an event source.
|
||
References: | REFERNCED DOCS |