AWS Certified Developer – Associate — Question 410
When a Developer tries to run an AWS CodeBuild project, it raises an error because the length of all environment variables exceeds the limit for the combined maximum of characters.
What is the recommended solution?
Answer options
- A. Add the export LC_ALL=ג€en_US.utf8ג€ command to the pre_build section to ensure POSIX localization.
- B. Use Amazon Cognito to store key-value pairs for large numbers of environment variables.
- C. Update the settings for the build project to use an Amazon S3 bucket for large numbers of environment variables.
- D. Use AWS Systems Manager Parameter Store to store large numbers of environment variables.
Correct answer: D
Explanation
AWS CodeBuild imposes a limit on the total combined character length of environment variables defined directly in the project configuration. To bypass this restriction, AWS recommends storing large quantities of environment variables in AWS Systems Manager Parameter Store and referencing them within the buildspec file. Amazon Cognito and Amazon S3 are not designed for direct environment variable integration in CodeBuild, and adjusting POSIX localization settings does not resolve character limit issues.