A company is deploying a web application on an Amazon EC2 instance that needs to read and write files to an Amazon S3 bucket. Which of the following is the AWS-recommended best practice to grant the application access to the S3 bucket?
- ACreate an IAM user with S3 permissions, generate access keys, and store them directly in the application configuration files on the EC2 instance.
- BUse the AWS account root user credentials inside the application configuration to guarantee access to the S3 bucket.
- Create an IAM role with the necessary S3 permissions and attach it to the Amazon EC2 instance.Cevap
- DRely on the AWS shared responsibility model, which automatically grants access permissions between compute and storage services within the same account.
Cevap
Create an IAM role with the necessary S3 permissions and attach it to the Amazon EC2 instance.
Creating an IAM role and attaching it to the Amazon EC2 instance is the recommended practice. AWS handles the rotation of temporary security credentials automatically, preventing the security risks associated with managing and storing long-term credentials on the instance.
Adım Adım Çözüm
Anahtar Kavram
Granting temporary credentials to AWS resources using IAM roles is a fundamental security best practice.
Tahmini Süre:1m 0s