exam questions

Exam AWS Certified Solutions Architect - Professional SAP-C02 All Questions

View all questions & answers for the AWS Certified Solutions Architect - Professional SAP-C02 exam

Exam AWS Certified Solutions Architect - Professional SAP-C02 topic 1 question 242 discussion

During an audit, a security team discovered that a development team was putting IAM user secret access keys in their code and then committing it to an AWS CodeCommit repository. The security team wants to automatically find and remediate instances of this security vulnerability.

Which solution will ensure that the credentials are appropriately secured automatically?

  • A. Run a script nightly using AWS Systems Manager Run Command to search for credentials on the development instances. If found, use AWS Secrets Manager to rotate the credentials
  • B. Use a scheduled AWS Lambda function to download and scan the application code from CodeCommit. If credentials are found, generate new credentials and store them in AWS KMS.
  • C. Configure Amazon Macie to scan for credentials in CodeCommit repositories. If credentials are found, trigger an AWS Lambda function to disable the credentials and notify the user.
  • D. Configure a CodeCommit trigger to invoke an AWS Lambda function to scan new code submissions for credentials. If credentials are found, disable them in AWS IAM and notify the user.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
SmileyCloud
Highly Voted 1 year, 4 months ago
Selected Answer: D
A - AWS Secrets Manager can't rotate the credentials if they are part of the code B - You don't store creds in KMS, that's the job of Secrets Manager C - Macie can do S3 only. CodeCommit backend is also S3 but it's transparent for us, so you can't use Macie. D - Correct. See this use case https://aws.amazon.com/blogs/compute/discovering-sensitive-data-in-aws-codecommit-with-aws-lambda-2/
upvoted 14 times
...
yuliaqwerty
Most Recent 10 months, 1 week ago
D https://aws.amazon.com/blogs/compute/discovering-sensitive-data-in-aws-codecommit-with-aws-lambda-2/
upvoted 1 times
...
Pupu86
11 months, 1 week ago
Using lambda to trigger a scan is retrospectively ineffective as Azure can do so with DevOps Organization advanced security (which does code scanning) and provide you an option to remediate if targets are found.
upvoted 1 times
...
career360guru
11 months, 1 week ago
Selected Answer: D
D is right option.
upvoted 1 times
...
joleneinthebackyard
12 months ago
Selected Answer: D
Macie only does S3 -> C is out Scheduled or nightly script will only detect the problem after a while so damage might has already done --> A, B is out Plus KMS doesnt do secrets D looks valid technically
upvoted 2 times
...
ggrodskiy
1 year, 3 months ago
Correct C. Macie can scan for credentials in CodeCommit repositories. According to the AWS documentation, Macie supports scanning for credentials in CodeCommit repositories and triggering actions based on the findings. You can use Macie to discover sensitive data such as AWS access keys, AWS secret access keys, private keys, and more in your CodeCommit repositories. You can also configure Macie to send notifications, invoke Lambda functions, or publish findings to AWS Security Hub when it detects sensitive data in CodeCommit repositories. For more information, see Data protection in AWS CodeCommithttps://docs.aws.amazon.com/macie/latest/user/what-is-macie.html and Amazon Macie | AWS Bloghttps://aws.amazon.com/blogs/aws/category/amazon-macie/.https://docs.aws.amazon.com/macie/latest/user/what-is-macie.html: https://docs.aws.amazon.com/codecommit/latest/userguide/data-protection.htmlhttps://aws.amazon.com/blogs/aws/category/amazon-macie/: https://aws.amazon.com/blogs/aws/category/amazon-macie/
upvoted 1 times
...
NikkyDicky
1 year, 3 months ago
Selected Answer: D
D - https://aws.amazon.com/blogs/compute/discovering-sensitive-data-in-aws-codecommit-with-aws-lambda-2/
upvoted 2 times
...
River007
1 year, 4 months ago
D can resolve the code that already commit to codecommit
upvoted 1 times
RockyLeon
1 year, 4 months ago
D says Codecommit trigger to scan new code submissions.... how already commit code will scan ?
upvoted 1 times
RockyLeon
1 year, 4 months ago
whereas question did not ask for existing code
upvoted 1 times
...
...
...
SkyZeroZx
1 year, 4 months ago
Selected Answer: D
Macie sounds good but not is use case is only scans S3. Then D is more apropiate in this case , similar question in this exam practice on Tutoriales Dojo
upvoted 1 times
...
Maria2023
1 year, 4 months ago
Selected Answer: D
Macie would be a great choice but at the moment it only scans S3. And even if CodeCommit ends in S3 (according to the AWS documentation) it is not visible for us and therefore I don't believe we an configure Macie to scan. At the moment Lambda remains the best choice
upvoted 2 times
...
gd1
1 year, 4 months ago
Selected Answer: D
Need auto-disable and D does it
upvoted 1 times
...
Alabi
1 year, 4 months ago
Selected Answer: D
D. Configure a CodeCommit trigger to invoke an AWS Lambda function to scan new code submissions for credentials. If credentials are found, disable them in AWS IAM and notify the user. Explanation: This solution leverages a CodeCommit trigger to automatically invoke an AWS Lambda function whenever new code is submitted to the repository. The Lambda function can scan the code for credentials and if found, take appropriate actions such as disabling those credentials in AWS IAM and notifying the user. This approach ensures that the security vulnerability is automatically identified and remediated as part of the development process, providing a proactive security measure.
upvoted 1 times
...
nexus2020
1 year, 4 months ago
Selected Answer: D
I would go with D. reason is ABC are all post event action, meaning the creditential are already leaked AFTER the code submition. only D would prevent it from happeninng by doing a check BEFORE it get submitted.
upvoted 4 times
...
MoussaNoussa
1 year, 4 months ago
option D is the correct one of course
upvoted 3 times
...
bhanus
1 year, 4 months ago
Selected Answer: C
C - https://docs.aws.amazon.com/macie/latest/user/managed-data-identifiers.html#managed-data-identifiers-credentials
upvoted 2 times
bhanus
1 year, 4 months ago
change it to D as it would prevent it from happeninng by doing a check BEFORE it get submitted.
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago