exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 194 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 194
Topic #: 1
[All AWS Certified Developer Associate Questions]

A company has copies of customer ID cards in its on-premises system. The company wants the on-premises system to automatically upload the ID card images directly to an Amazon S3 bucket.

What is the MOST secure way to meet this requirement?

  • A. Use the AWS SDK to upload the images to the S3 bucket directly from the on-premises system. Create an IAM user. Attach the user to a policy that includes the s3:PutObject permission. Configure the on-premises system to use the generated access key and secrets to authenticate access to AWS.
  • B. Use the AWS SDK to upload the images to the S3 bucket directly from the on-premises system. Create an IAM role. Attach the role to a policy that includes the s3:PutObject permission. Configure the on-premises system to use the AssumeRole functionality in the AWS SDK to authenticate access to AWS.
  • C. Use S3 presigned URLs to upload the images to the S3 bucket directly from the on-premises system. Generate the presigned URLs by using an AWS Lambda function and a private REST API endpoint. Create an AWS Site-to-Site VPN connection between the on-premises network and the VPC to allow the on-premises system to call the API to receive the presigned URLs.
  • D. Use S3 presigned URLs to upload the images to the S3 bucket directly from the on-premises system. Generate the presigned URLs by using an AWS Lambda function and a public REST API endpoint. Secure the API by adding an Amazon Cognito authorizer. Create a user for the on-premises system to use for authentication to call the API to receive the presigned URLs.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
a15ce96
1 year, 3 months ago
Selected Answer: C
IMHO, C looks the most secure. Because of: the pre-signed URL, a secure VPN connection between on-prem and cloud (MUST), no need to store any creds on the on-prem side. The question doesn't contain keywords like "less operational overhead", but "the most secure". It means that we can go with more complex, but secure solution.
upvoted 1 times
...
perfmon
1 year, 3 months ago
Option B - Risk Profile: - Create an IAM role, which provides temporary security credentials without the need for long-term access keys and secrets. - utilizes IAM roles with temporary credentials and follows the principle of least privilege. Only one permission is required. S3:PutObject - Roles can be assumed by trusted entities, reducing the risk associated with long-term credentials being compromised. - The AssumeRole functionality allows the on-premises system to temporarily assume the permissions of the IAM role, enhancing security. Option C - Risk Profile: - This option involves using presigned URLs, which are temporary URLs generated by AWS that grant limited access to specific S3 operations. - It requires setting up a private REST API endpoint, which adds complexity to the architecture. - Creating a Site-to-Site VPN connection between the on-premises network and the VPC adds an additional layer of security for communication, but it also introduces management overhead.
upvoted 1 times
...
perfmon
1 year, 3 months ago
Yes, you can attach a user or a role to an IAM policy in AWS. Creating roles and attaching policies (console) https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions_create-policies.html Attach an IAM managed policy to a user https://docs.aws.amazon.com/cli/latest/userguide/cli-services-iam-policy.html
upvoted 1 times
...
monishvster
1 year, 3 months ago
Selected Answer: B
LESS STEPS
upvoted 1 times
...
a_win
1 year, 5 months ago
Selected Answer: B
it is most secure with less overhead
upvoted 1 times
...
wonder_man
1 year, 8 months ago
Selected Answer: D
Why C is the most popular? Why do we need a VPN to VPC if we need access to S3 which is not in VPC? But the C option clearly states "AWS Site-to-Site VPN connection between the on-premises network and the VPC".
upvoted 1 times
wonder_man
1 year, 8 months ago
Sorry, that's for the REST API endpoint inside the VPC, therefore C is the most secure option. Anyway, I think this solution is too complicated for simple uploading stuff into S3
upvoted 2 times
...
...
AswinDe
1 year, 10 months ago
why it is not A?
upvoted 3 times
ninomfr64
1 year, 9 months ago
A uses long term credentials, while B uses short term credentials. Using Signed URL would be even more secure as no credential is needed to be store on-premise. Thus A
upvoted 1 times
...
...
rcaliandro
1 year, 11 months ago
AI DONNO
upvoted 1 times
...
pranay_2406
2 years ago
Selected Answer: C
Option C provides a secure solution by leveraging S3 presigned URLs and a private REST API endpoint. Here's how it works: Generate S3 presigned URLs: Use an AWS Lambda function to generate S3 presigned URLs. These URLs will have a limited time validity and will grant temporary access to upload the ID card images to the S3 bucket. Private REST API endpoint: Create a private REST API endpoint in API Gateway that invokes the Lambda function. This API endpoint should be accessible only from within the AWS infrastructure or through a secure connection. AWS Site-to-Site VPN connection: Establish an AWS Site-to-Site VPN connection between the on-premises network and the Amazon Virtual Private Cloud (VPC) where the API Gateway and Lambda function reside. This VPN connection ensures secure and encrypted communication between the on-premises system and the private REST API endpoint.
upvoted 4 times
pranay_2406
2 years ago
On-premises system integration: Configure the on-premises system to call the private REST API endpoint to receive the generated S3 presigned URLs. This can be done through the VPN connection established in the previous step. Uploading ID card images: The on-premises system can then use the received presigned URLs to directly upload the ID card images to the S3 bucket. The presigned URLs grant temporary access and permissions for uploading the images without the need for long-term access keys or credentials. By using S3 presigned URLs with a private REST API endpoint and a VPN connection, the on-premises system securely uploads the ID card images to the S3 bucket without exposing any long-term access keys or credentials. The private REST API endpoint ensures that the API is only accessible from within the AWS infrastructure or through the secure VPN connection, providing an additional layer of security.
upvoted 1 times
pranay_2406
2 years ago
Let's take a closer look at why option B is not the most secure solution for the given requirements. Option B suggests creating an IAM role and attaching it to a policy that includes the s3:PutObject permission. The on-premises system would then use the AssumeRole functionality in the AWS SDK to authenticate access to AWS and directly upload the ID card images to the S3 bucket. While using an IAM role is a more secure approach than using access keys (as mentioned in option A), it still has some limitations and potential security risks in this scenario: Network connectivity: Option B assumes that there is a direct network connection between the on-premises system and AWS. This introduces potential security concerns, especially if the connection is not properly secured or if the on-premises system is exposed to the internet.
upvoted 1 times
pranay_2406
2 years ago
Access management: Creating and managing IAM roles for each on-premises system can become cumbersome, especially if there are a large number of systems or frequent changes. It may also introduce the risk of misconfiguration or granting excessive permissions if not properly managed. Long-term credentials: While the AssumeRole functionality allows for temporary access to AWS services, the on-premises system would still need to have long-term credentials (such as access keys) to assume the IAM role. This introduces the risk of these credentials being compromised, potentially leading to unauthorized access to the S3 bucket. Given these considerations, option C, which leverages S3 presigned URLs with a private REST API endpoint and a VPN connection, provides a more secure approach for uploading ID card images from the on-premises system to the S3 bucket. It avoids the need for long-term credentials and ensures secure communication through a private API endpoint and a VPN connection.
upvoted 1 times
shasankperiwal
2 years ago
God ho kya bhai
upvoted 3 times
...
...
...
...
...
MrTee
2 years, 1 month ago
Selected Answer: B
Option B is the most secure because it involves creating an IAM role with the required permissions and configuring the on-premises system to use AssumeRole functionality in the AWS SDK to authenticate access to AWS. This way, the on-premises system does not have access keys or secrets, reducing the risk of compromise. Also, IAM roles have temporary security credentials that automatically rotate, making it harder for attackers to gain persistent access to the S3 bucket.
upvoted 3 times
...
ondrejc
2 years, 2 months ago
Selected Answer: C
It is C
upvoted 2 times
...
qsergii
2 years, 2 months ago
Why D is not an option?
upvoted 2 times
...
capesignalfreer
2 years, 2 months ago
Selected Answer: B
I prefer B over C as C creates an URL that can be leaked and therefore, IMO, is less secure than B.
upvoted 1 times
...
MMaquis
2 years, 3 months ago
Selected Answer: C
The answer is C. A and B are wrong at first because u can't attach user|role to a policy.
upvoted 4 times
MMaquis
2 years, 3 months ago
I'm surprised the voted answers are very wrong, great job engineers.
upvoted 1 times
...
...
m4r0ck
2 years, 3 months ago
Selected Answer: C
C is the right answer: Presigned URL generated dynamically using the SDK on a lambda function + site to site VPN
upvoted 2 times
...
mistral
2 years, 3 months ago
Selected Answer: D
The most secure way to meet this requirement is option D: Use S3 presigned URLs to upload the images to the S3 bucket directly from the on-premises system. Generate the presigned URLs by using an AWS Lambda function and a public REST API endpoint. Secure the API by adding an Amazon Cognito authorizer. Create a user for the on-premises system to use for authentication to call the API to receive the presigned URLs. Option D provides a secure solution as it uses S3 presigned URLs, which are time-limited URLs that grant temporary access to upload the ID card images to the S3 bucket. By generating presigned URLs on the server-side with an AWS Lambda function, the on-premises system can securely upload the ID card images directly to the S3 bucket without requiring access keys and secrets. To further secure the solution, an Amazon Cognito authorizer can be added to the public REST API endpoint to authenticate the on-premises system before allowing access to generate the presigned URLs. This approach ensures that only authenticated and authorized systems can generate the presigned URLs, providing an additional layer of security.
upvoted 1 times
...
ezeik
2 years, 3 months ago
Selected Answer: C
the c is the most secure imho.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...