Security
390 soru
A developer is building a serverless e-learning application where students log in using an Amazon Cognito User Pool. The application's frontend client needs to access course content through an Amazon API Gateway REST API. The developer needs to secure the API so that only authenticated students can access the resource, verifying their identity directly via their login session tokens. Which solution should the developer implement to meet these requirements with the least operational overhead?
A developer is creating an IAM role for an AWS Lambda function that needs to write logs to an Amazon S3 bucket named "my-app-logs-bucket". The developer has written the following permissions policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::my-app-logs-bucket/*"
}
]
}
Which two configuration steps must the developer perform to ensure the Lambda function has the necessary permissions to write to the S3 bucket?
Geçerli olan tümünü seçin
A developer is deploying a Python application to AWS Elastic Beanstalk. The application needs to retrieve two values: a connection string password for a self-hosted PostgreSQL database running on an Amazon EC2 instance (which must be rotated every 45 days), and a payment gateway API endpoint URL (which is non-sensitive and static). To meet these requirements with the lowest cost and operational effort, which two configuration steps should the developer perform? (Select TWO.)
Geçerli olan tümünü seçin
A developer is building a high-throughput microservice that must encrypt data payloads (each approximately in size) locally before storing them in an database. To implement envelope encryption efficiently and minimize network latency, the service needs to obtain a new symmetric key that contains both a plaintext version for immediate encryption and an encrypted version for storage alongside the data. Which AWS KMS API operation should the service call to receive both versions in a single request?
A developer is building a single-page web application (SPA) that will allow users to authenticate using Amazon Cognito User Pools and access backend services through Amazon API Gateway. Since the SPA runs entirely in the user's browser, the client credentials cannot be kept secure. The developer wants to implement a secure authentication flow using the authorization code grant with Proof Key for Code Exchange (PKCE) and validate access at the API Gateway layer. Which TWO steps should the developer take to implement this architecture?
Geçerli olan tümünü seçin
A developer is implementing a mobile application that uses an Amazon Cognito identity pool to grant users temporary AWS credentials for uploading files to an Amazon S3 bucket. The developer has created an IAM role for authenticated users, but when the mobile application attempts to exchange the Cognito identity token for temporary credentials, the request fails with an access denied error. The developer reviews the trust policy currently attached to the IAM role:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "cognito-identity.amazonaws.com"
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"cognito-identity.amazonaws.com:aud": "us-east-1:12345678-1234-1234-1234-1234567890ab"
},
"ForAnyValue:StringLike": {
"cognito-identity.amazonaws.com:amr": "authenticated"
}
}
}
]
}
Which modification to the trust policy will resolve this issue?
A developer is creating an IAM role that will be used by an AWS Lambda function to access other AWS resources. The developer needs to ensure that the AWS Lambda service itself is authorized to assume this role. Which type of policy must the developer configure to define which service principal can assume the role?
A developer is configuring a containerized application running on Amazon ECS that needs to access two settings: a public API endpoint URL (non-sensitive configuration) and a database password for an Amazon RDS database. The database password must be rotated automatically every 30 days. To ensure the design is both secure and cost-effective, which configuration should the developer implement?
A developer is building a sensitive medical telemetry ingestion application. The application receives health records (each approximately in size) that must be encrypted client-side using envelope encryption before being stored in Amazon DynamoDB. The developer needs to implement this workflow using the AWS SDK and a customer managed key in AWS KMS.
Which two steps must the developer perform to encrypt and store each health record? (Select TWO.)
Geçerli olan tümünü seçin
A developer is designing a serverless data ingestion application on AWS Lambda. The application requires access to a third-party service API key that must be rotated automatically every 30 days, as well as a non-sensitive database port number that does not change. To minimize cost and operational overhead, which two actions should the developer take to store and manage these parameters? (Select TWO.)
Geçerli olan tümünü seçin
An enterprise application running on Amazon EC2 instances in Account A must retrieve database archives from an Amazon S3 bucket located in Account B. The bucket, named `corporate-db-archives`, uses a customer managed key (CMK) in AWS KMS for server-side encryption. The EC2 instances are associated with an IAM role in Account A named `ArchiveReaderRole`. A developer has already attached a permissions policy to `ArchiveReaderRole` that permits S3 read operations on the bucket and KMS decrypt operations on the CMK. Which two resource-based policies in Account B must be updated to successfully authorize this cross-account read operation? (Select two.)
Geçerli olan tümünü seçin
A developer is implementing a microservice in AWS Account A that needs to securely access a database credential managed in a centralized security AWS Account B. The microservice must access the credential directly without assuming an IAM role in Account B. Which approach should the developer use to meet these requirements?
A developer is deploying an application to a fleet of Amazon EC2 instances in an Auto Scaling group. The application needs to retrieve two configuration settings: a database password for an Amazon Aurora PostgreSQL database that must be rotated automatically every 30 days, and a non-sensitive external API endpoint URL. The developer wants to minimize operational overhead and cost. Which combination of actions should the developer take to store these configurations? (Select TWO.)
Geçerli olan tümünü seçin
A developer is implementing a client-side decryption module for a batch processing application. The application downloads encrypted data archives (each approximately in size) from an Amazon S3 bucket. Each archive was previously encrypted using envelope encryption with a customer managed key (CMK) in AWS KMS. The encrypted data key is stored alongside the archive in the Amazon S3 object metadata. What sequence of operations must the developer implement in the application to decrypt each archive?
A developer is writing an application that must encrypt a application configuration file client-side before uploading it to an Amazon S3 bucket. The security policy requires using envelope encryption with an AWS KMS Customer Managed Key (CMK).
Which of the following workflows should the developer implement to meet these requirements?
A developer is deploying a microservice to Amazon Elastic Container Service (Amazon ECS) on AWS Fargate. The microservice needs to connect to an Amazon Aurora MySQL database. The database credentials must be rotated automatically every 30 days to comply with organizational security policies. The developer needs to implement a solution that retrieves these credentials securely without hardcoding them or causing application downtime during rotation.
Which two actions should the developer take to meet these requirements? (Select TWO.)
Geçerli olan tümünü seçin
A developer is deploying a containerized application on Amazon ECS using the AWS Fargate launch type. The application is designed to poll an Amazon SQS queue and process incoming messages. The task definition uses the awslogs log driver to send container logs to Amazon CloudWatch Logs. During deployment, the task fails to launch, and the AWS Management Console displays the following error:
ResourceInitializationError: unable to pull secrets or registry auth: execution role does not have permissions to pull from ECR
The developer verifies that two IAM roles are associated with the task definition: ApplicationTaskExecutionRole and ApplicationTaskRole.
Which action must the developer take to resolve the container startup failure and ensure the application can poll the SQS queue once running?
An e-commerce backend running on AWS Lambda needs to store sensitive customer profile data in an Amazon RDS database. Due to compliance requirements, the application must encrypt the profile data client-side before sending it to the database. The size of each profile is approximately .
Which of the following steps must the developer perform in the application code to implement this client-side encryption? (Select TWO)
Geçerli olan tümünü seçin
A developer is designing a data archival application that needs to encrypt database export files that are approximately in size before uploading them to an Amazon S3 bucket. The security policy requires client-side envelope encryption using an AWS KMS customer managed key.
Which of the following application workflows satisfies these requirements with the minimum number of AWS KMS API requests?
A developer is deploying a containerized application to Amazon Elastic Kubernetes Service (Amazon EKS). The application requires access to a database password for an Amazon RDS DB instance and an API key for a third-party service. The database password must be rotated every 30 days. The third-party API key changes infrequently, and the developer wants to access it with minimum latency and cost. Which combination of steps should the developer take to retrieve these configurations securely and cost-effectively? (Select TWO.)
Geçerli olan tümünü seçin