What's the best method for passing AWS credentials as user data to an EC2 instance?

后端 未结 5 1183
面向向阳花
面向向阳花 2021-01-30 07:17

I have a job processing architecture based on AWS that requires EC2 instances query S3 and SQS. In order for running instances to have access to the API the credentials are sen

5条回答
  •  说谎
    说谎 (楼主)
    2021-01-30 08:11

    I'd like to point out that it is not needed to supply any credentials to your EC2 instance anymore. Using IAM, you can create a role for your EC2 instances. In these roles, you can set fine-grained policies that allow your EC2 instance to, for example, get a specific object from a specific S3 bucket and no more. You can read more about IAM Roles in the AWS docs:

    http://docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html

提交回复
热议问题