App Runner: Container access to AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY

0

Hi,

I have an app runner instance with NodeJS14 + Strapi from a container, for some of the plugins I'm using they require an access key id, secret access key. How do I handle this situation? it doesn't look like they are set as environment variables by default?

Thanks.

질문됨 2년 전328회 조회
1개 답변
0

Hello,

You will need to provide an Instance Role during the App Runner service creation. The instance role is an optional role that App Runner uses to provide permissions to AWS API actions that your App Runner service would like to make.

Before creating the App Runner service, create an IAM role with the required custom or managed IAM policies and attach the below trust relationship to it.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "tasks.apprunner.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}

After the IAM role is created and the trust-relationship added, specify this IAM role as the Instance Role during the AppRunner service creation. Please refer this document for more info on how to use the App Runner Instance Role.

If you are using the AWS SDK to perform AWS API calls, the SDK will use the credentials provided by your Instance Role and perform the required AWS API calls.

profile pictureAWS
지원 엔지니어
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠