AWS Certified Developer - Associate

AWS Certified Developer - Associate

Get started today

Ultimate access to all questions.


In a single AWS account with multiple environments, a development team faces an issue where development S3 buckets are triggering production Lambda functions, causing unintended executions. To adhere to security best practices and prevent this, what is the appropriate solution?




Explanation:

The correct answer is C. Adding a resource policy to the production Lambda function to allow only the production S3 bucket to invoke the function ensures that only events from the designated production S3 bucket can trigger the production Lambda function. This prevents development or other non-production buckets from inadvertently invoking production Lambda functions, thereby maintaining environment integrity and adhering to security best practices. While option B also mentions following best practices by separating environments into different accounts, it is not strictly necessary if the resource policy can effectively isolate the environments within the same account.