A developer needs to configure a script running on their local workstation to upload log files to an Amazon S3 bucket. Which of the following is the AWS-recommended method to securely authenticate this script?
- AGenerate and use the AWS account root user access keys to ensure the script has uninterrupted access.
- Create an IAM user for the developer, generate programmatic access keys, and assign only the necessary permissions to write to the S3 bucket.Answer
- CCreate an IAM role with console access credentials and hardcode those credentials directly within the script.
- DContact AWS Support to configure the local workstation's IP address to bypass AWS authentication requirements.
Answer
Create an IAM user for the developer, generate programmatic access keys, and assign only the necessary permissions to write to the S3 bucket.
The correct answer is to create an IAM user for the developer, generate programmatic access keys, and assign only the necessary permissions to write to the S3 bucket. This ensures the script uses programmatic credentials with the minimum required privileges, securing the account.
Step-by-Step Solution
Key Concept
AWS IAM Programmatic Access and Least Privilege