EXAM01 Flashcards

1
Q

Which of the following security credentials can only be created by the AWS Account root user?

EC2 Instance Key Pairs

CloudFront Key Pairs

AM User Access Keys

AM User passwords

A

CloudFront Key Pairs - IAM users can’t create CloudFront key pairs. You must log in using root credentials to create key pairs.

For Amazon CloudFront, you use key pairs to create signed URLs for private content, such as when you want to distribute restricted content that someone paid for.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A multi-national company has multiple business units with each unit having its own AWS account. The development team at the company would like to debug and trace data across accounts and visualize it in a centralized account.

As a Developer Associate, which of the following solutions would you suggest for the given use-case?

X-Ray

VPC Flow Logs

CloudWatch Events

CloudTrail

A

AWS X-Ray helps developers analyze and debug production, distributed applications, such as those built using a microservices architecture. With X-Ray, you can understand how your application and its underlying services are performing to identify and troubleshoot the root cause of performance issues and errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

To enable HTTPS connections for his web application deployed on the AWS Cloud, a developer is in the process of creating server certificate.

Which AWS entities can be used to deploy SSL/TLS server certificates? (Select two)

IAM

AWS Certificate Manager

AWS CloudFormation

AWS Secrets Manager

AWS Systems Manager

A

AWS Certificate Manager - AWS Certificate Manager (ACM) is the preferred tool to provision, manage, and deploy server certificates. With ACM you can request a certificate or deploy an existing ACM or external certificate to AWS resources. Certificates provided by ACM are free and automatically renew.

IAM - IAM is used as a certificate manager only when you must support HTTPS connections in a Region that is not supported by ACM. IAM securely encrypts your private keys and stores the encrypted version in IAM SSL certificate storage.

https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-c

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The manager at an IT company wants to set up member access to user-specific folders in an Amazon S3 bucket - bucket-a. So, user x can only access files in his folder - bucket-a/user/user-x/ and user y can only access files in her folder - bucket-a/user/user-y/ and so on.

As a Developer Associate, which of the following IAM constructs would you recommend so that the policy snippet can be made generic for all team members and the manager does not need to create separate IAM policy for each team member?

IAM policy resource

IAM policy variables

IAM policy principal

IAM policy condition

A

IAM policy condition - The Condition element (or Condition block) lets you specify conditions for when a policy is in effect, like so - “Condition” : { “StringEquals” : { “aws:username” : “johndoe” }}. This can not be used to address the requirements of the given use-case.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The development team at a company creates serverless solutions using AWS Lambda. Functions are invoked by clients via AWS API Gateway which anyone can access. The team lead would like to control access using a 3rd party authorization mechanism.

As a Developer Associate, which of the following options would you recommend for the given use-case?

  • IAM permissions with sigv4
  • Cognito User Pools
  • Lambda Authorizer
  • API Gateway User Pools
A

A Lambda authorizer (formerly known as a custom authorizer) is an API Gateway feature that uses a Lambda function to control access to your API.

A Lambda authorizer is useful if you want to implement a custom authorization scheme that uses a bearer token authentication strategy such as OAuth or SAML, or that uses request parameters to determine the caller’s identity.

https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Your global organization has an IT infrastructure that is deployed using CloudFormation on AWS Cloud. One employee, in us-east-1 Region, has created a stack ‘Application1’ and made an exported output with the name ‘ELBDNSName’. Another employee has created a stack for a different application ‘Application2’ in us-east-2 Region and also exported an output with the name ‘ELBDNSName’. The first employee wanted to deploy the CloudFormation stack ‘Application1’ in us-east-2, but it got an error. What is the cause of the error?

Output Values in CloudFormation must have unique names within a single Region

Exported Output Values in CloudFormation must have unique names within a single Region

Output Values in CloudFormation must have unique names across all Regions

Exported Output Values in CloudFormation must have unique names across all Regions

A

Exported Output Values in CloudFormation must have unique names within a single Region

Export (optional): The name of the resource output to be exported for a cross-stack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

An organization has offices across multiple locations and the technology team has configured an Application Load Balancer across targets in multiple Availability Zones. The team wants to analyze the incoming requests for latencies and the client’s IP address patterns.

Which feature of the Load Balancer will help collect the required information?

CloudTrail logs

CloudWatch metrics

ALB access logs

ALB request tracing

A

Elastic Load Balancing provides access logs that capture detailed information about requests sent to your load balancer. Each log contains information such as the time the request was received, the client’s IP address, latencies, request paths, and server responses. You can use these access logs to analyze traffic patterns and troubleshoot issues.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What’s the use of ALB request tracing

A

When the load balancer receives a request from a client, it adds or updates the X-Amzn-Trace-Id header before sending the request to the target. Any services or applications between the load balancer and the target can also add or update this header.

You can use request tracing to track HTTP requests from clients to targets or other services. If you enable access logs, the contents of the X-Amzn-Trace-Id header are logged. For more information, see Access logs for your Application Load Balancer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which of the following best describes how KMS Encryption works?

KMS receives CMK from the client at every encrypt call, and encrypts the data with that

KMS stores the CMK, and receives data from the clients, which it encrypts and sends back

KMS sends the CMK to the client, which performs the encryption and then deletes the CMK

KMS generates a new CMK for each Encrypt call and encrypts the data with it

A

KMS stores the CMK, and receives data from the clients, which it encrypts and sends back

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Amazon Simple Queue Service (SQS) has a set of APIs for various actions supported by the service.

As a developer associate, which of the following would you identify as correct regarding the CreateQueue API? (Select two)

  • The visibility timeout value for the queue is in seconds, which defaults to 30 seconds
  • The dead-letter queue of a FIFO queue must also be a FIFO queue. Whereas, the dead-letter queue of a standard queue can be a standard queue or a FIFO queue
  • The length of time, in seconds, for which the delivery of all messages in the queue is delayed is configured using MessageRetentionPeriod attribute
  • Queue tags are case insensitive. A new tag with a key identical to that of an existing tag overwrites the existing tag -
  • You can’t change the queue type after you create it
A

You can’t change the queue type after you create it - You can’t change the queue type after you create it and you can’t convert an existing standard queue into a FIFO queue. You must either create a new FIFO queue for your application or delete your existing standard queue and recreate it as a FIFO queue.

The visibility timeout value for the queue is in seconds, which defaults to 30 seconds - The visibility timeout for the queue is in seconds. Valid values are: An integer from 0 to 43,200 (12 hours), the Default value is 30.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A cybersecurity firm wants to run their applications on single-tenant hardware to meet security guidelines.

Which of the following is the MOST cost-effective way of isolating their Amazon EC2 instances to a single tenant?

  • Dedicated Instances
  • Spot Instances
  • Dedicated Hosts
  • On-Demand Instances
A

Dedicated Instances are Amazon EC2 instances that run in a virtual private cloud (VPC) on hardware that’s dedicated to a single customer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In the EC2 context what is a dedicated host use-case?

A

An Amazon EC2 Dedicated Host is a physical server with EC2 instance capacity fully dedicated to your use. Dedicated Hosts allow you to use your existing per-socket, per-core, or per-VM software licenses, including Windows Server, Microsoft SQL Server, SUSE, and Linux Enterprise Server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A developer has an application that stores data in an Amazon S3 bucket. The application uses an HTTP API to store and retrieve objects. When the PutObject API operation adds objects to the S3 bucket the developer must encrypt these objects at rest by using server-side encryption with Amazon S3-managed keys (SSE-S3).

Which solution will guarantee that any upload request without the mandated encryption is not processed?

  • Invoke the PutObject API operation and set the x-amz-server-side-encryption header as aws:kms. Use an S3 bucket policy to deny permission to upload an object unless the request has this header
  • Invoke the PutObject API operation and set the x-amz-server-side-encryption header as AES256. Use an S3 bucket policy to deny permission to upload an object unless the request has this header
  • Invoke the PutObject API operation and set the x-amz-server-side-encryption header as sse:s3. Use an S3 bucket policy to deny permission to upload an object unless the request has this header
  • Set the encryption key for SSE-S3 in the HTTP header of every request. Use an S3 bucket policy to deny permission to upload an object unless the request has this header
A
  • Invoke the PutObject API operation and set the x-amz-server-side-encryption header as AES256. Use an S3 bucket policy to deny permission to upload an object unless the request has this header
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A company wants to provide beta access to some developers on its development team for a new version of the company’s Amazon API Gateway REST API, without causing any disturbance to the existing customers who are using the API via a frontend UI and Amazon Cognito authentication. The new version has new endpoints and backward-incompatible interface changes, and the company’s development team is responsible for its maintenance.

Which of the following will satisfy these requirements in the MOST operationally efficient manner?

  • Create a development stage on the API Gateway API and then have the developers point the endpoints to the development stage
  • Configure a canary release deployment on the API Gateway API and then have the developers point to the relevant deployment by referencing the stage variable in the endpoint -
  • Create new API keys on the API Gateway API and then have the developers point the endpoints by passing the new API keys
  • Create a new API Gateway API that points to the new API application code and then have the developers point the endpoints to the new API
A

Create a development stage on the API Gateway API and then have the developers point the endpoints to the development stage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does the Cloudformation Transform section do?

A

For serverless applications (also referred to as Lambda-based applications), specifies the version of the AWS Serverless Application Model (AWS SAM) to use. When you specify a transform, you can use AWS SAM syntax to declare resources in your template. The model defines the syntax that you can use and how it’s processed.

You can also use AWS::Include transforms to work with template snippets that are stored separately from the main AWS CloudFormation template. You can store your snippet files in an Amazon S3 bucket and then reuse the functions across multiple

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a CloudFormation Instrinsic fnuction?

A

Intrinsic Functions are used to assign values to properties that are not available until runtime. They usually start with Fn:: or !. Example: !Sub or Fn::Sub.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

You are creating a Cloud Formation template to deploy your CMS application running on an EC2 instance within your AWS account. Since the application will be deployed across multiple regions, you need to create a map of all the possible values for the base AMI.

How will you invoke the !FindInMap function to fulfill this use case?

  • !FindInMap [ MapName, TopLevelKey ]
  • !FindInMap [ MapName ]
  • !FindInMap [ MapName, TopLevelKey, SecondLevelKey, ThirdLevelKey ]
  • !FindInMap [ MapName, TopLevelKey, SecondLevelKey ]
A
  • !FindInMap [ MapName, TopLevelKey, SecondLevelKey ]

The intrinsic function Fn::FindInMap returns the value corresponding to keys in a two-level map that’s declared in the Mappings section.

18
Q

The development team has just configured and attached the IAM policy needed to access AWS Billing and Cost Management for all users under the Finance department. But, the users are unable to see AWS Billing and Cost Management service in the AWS console.

What could be the reason for this issue?

  • You need to activate IAM user access to the Billing and Cost Management console for all the users who need access
  • The users might have another policy that restricts them from accessing the Billing information
  • Only root user has access to AWS Billing and Cost Management console
  • IAM user should be created under AWS Billing and Cost Management and not under the AWS account to have access to Billing console
A

You need to activate IAM user access to the Billing and Cost Management console for all the users who need access

19
Q

What’s the use of IAM Access Analyzer

A

AWS IAM Access Analyzer helps you identify the resources in your organization and accounts, such as Amazon S3 buckets or IAM roles, that are shared with an external entity. This lets you identify unintended access to your resources and data, which is a security risk.

20
Q

What’s the use of the Access Advisor feature on IAM console

A

To help identify the unused roles, IAM reports the last-used timestamp that represents when a role was last used to make an AWS request. Your security team can use this information to identify, analyze, and then confidently remove unused roles.

21
Q

What’s the use of S3 Analytics?

A

By using Amazon S3 analytics Storage Class Analysis you can analyze storage access patterns to help you decide when to transition the right data to the right storage class. You cannot use S3 Analytics to identify unintended access to your S3 resources.

22
Q

A development team has configured inbound traffic for the relevant ports in both the Security Group of the EC2 instance as well as the Network Access Control List (NACL) of the subnet for the EC2 instance. The team is, however, unable to connect to the service running on the Amazon EC2 instance.

As a developer associate, which of the following will you recommend to fix this issue?

  • Network ACLs are stateful, so allowing inbound traffic to the necessary ports enables the connection. Security Groups are stateless, so you must allow both inbound and outbound traffic
  • Security Groups are stateful, so allowing inbound traffic to the necessary ports enables the connection. Network ACLs are stateless, so you must allow both inbound and outbound traffic
  • IAM Role defined in the Security Group is different from the IAM Role that is given access in the Network ACLs
  • Rules associated with Network ACLs should never be modified from the command line. An attempt to modify rules from the command line blocks the rule and results in an erratic behavior
A

Security Groups are stateful, so allowing inbound traffic to the necessary ports enables the connection. Network ACLs are stateless, so you must allow both inbound and outbound traffic

23
Q

What’s the use of Route53’s A record type

A

You use an A record to route traffic to a resource, such as a web server, using an IPv4 address in dotted decimal notation.

24
Q

What’s the use of Route53’s **AAAA record type
** ?

A

You use an AAAA record to route traffic to a resource, such as a web server, using an IPv6 address in colon-separated hexadecimal format.

25
Q

What’s the use of Route53’s CNAME record type ?

A

A CNAME record maps DNS queries for the name of the current record, such as acme.example.com, to another domain (example.com or example.net) or subdomain (acme.example.com or zenith.example.org).

26
Q

What’s the use of Route53’s DS record type ?

A

A delegation signer (DS) record refers a zone key for a delegated subdomain zone.

27
Q

What’s the use of Route53’s NS record type ?

A

An NS record identifies the name servers for the hosted zone.

28
Q

What’s the use of Route53’s PTR record type ?

A

A PTR record maps an IP address to the corresponding domain name.

29
Q

When to use alias or CNAME?

A

Alias records
An alias record can only redirect queries to selected AWS resources, such as the following:

  • Amazon S3 buckets
  • CloudFront distributions
  • Another record in the same Route 53 hosted zone

For example, you can create an alias record named acme.example.com that redirects queries to an Amazon S3 bucket that is also named acme.example.com. You can also create an acme.example.com alias record that redirects queries to a record named zenith.example.com in the example.com hosted zone.

CNAME records
A CNAME record can redirect DNS queries to any DNS record. For example, you can create a CNAME record that redirects queries from acme.example.com to zenith.example.com or to acme.example.org. You don’t need to use Route 53 as the DNS service for the domain that you’re redirecting queries to.

30
Q

Which is the only resource-based policy that the IAM service supports?

A

Trust policy - Trust policies define which principal entities (accounts, users, roles, and federated users) can assume the role. An IAM role is both an identity and a resource that supports resource-based policies.

31
Q

Which are the SAM resource types?

A

AWS::Serverless::Api
AWS::Serverless::Application
AWS::Serverless::Connector
AWS::Serverless::Function
AWS::Serverless::HttpApi
AWS::Serverless::LayerVersion
AWS::Serverless::SimpleTable
AWS::Serverless::StateMachine

32
Q

What is the AWS CloudFormation StackSets use case?

A

AWS CloudFormation StackSets extends the capability of stacks by enabling you to create, update, or delete stacks across multiple accounts and AWS Regions with a single operation.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/what-is-c

33
Q

What’s the use of Access Advisor feature on IAM console?

A

To help identify the unused roles, IAM reports the last-used timestamp that represents when a role was last used to make an AWS request. Your security team can use this information to identify, analyze, and then confidently remove unused roles.

34
Q

What’s the use of Amazon Inspector?

A

Amazon Inspector is an automated security assessment service that helps improve the security and compliance of applications deployed on AWS. Amazon Inspector automatically assesses applications for exposure, vulnerabilities, and deviations from best practices.

35
Q

What’s the use of AWS Trusted Advisor?

A

AWS Trusted Advisor is an online tool that provides you real-time guidance to help you provision your resources following AWS best practices on cost optimization, security, fault tolerance, service limits, and performance improvement.

36
Q

What are the CDK steps?

A
  1. Create the app from template
  2. Add the code
  3. Build (optional)
  4. Synth
  5. Deploy
37
Q

What is “AWS Serverless Application Repository (SAR)” ?

A

The AWS Serverless Application Repository is a managed repository for serverless applications. It enables teams, organizations, and individual developers to store and share reusable applications, and easily assemble and deploy serverless architectures in powerful new ways.

38
Q

IAM supports CodeCommit with three types of credentials:

A
  • Git credentials, an IAM-generated user name and password pair you can use to communicate with CodeCommit repositories over HTTPS.
  • SSH keys, a locally generated public-private key pair that you can associate with your IAM user to communicate with CodeCommit repositories over SSH.
  • AWS access keys, which you can use with the credential helper included with the AWS CLI to communicate with CodeCommit repositories over HTTPS.
39
Q

A startup with newly created AWS account is testing different EC2 instances. They have used Burstable performance instance - T2.micro - for 35 seconds and stopped the instance.

At the end of the month, what is the instance usage duration that the company is charged for?

A

0 seconds - AWS states that, if your AWS account is less than 12 months old, you can use a t2.micro instance for free within certain usage limits.

40
Q

How to scale based on Amazon SQS?

A

Target tracking scaling—Increase and decrease the current capacity of the group based on a Amazon CloudWatch metric and a target value. It works similar to the way that your thermostat maintains the temperature of your home—you select a temperature and the thermostat does the rest.

41
Q

How to scale based on Amazon SQS?

A

Target tracking scaling: Increase and decrease the current capacity of the group based on a Amazon CloudWatch metric and a target value. It works similar to the way that your thermostat maintains the temperature of your home—you select a temperature and the thermostat does the rest.