- Le plus récent
- Le plus de votes
- La plupart des commentaires
Hello there,
I see that you are getting “Resource handler returned message: "Error in assuming access role arn:aws:iam::<REDACTED>:role/CdkStack-AppRunnerRoleTestingEE644DF4-aM6ZIsSrivEy” when creating AppRunner service using CDK Code.
Looking at the error it seems that issue with AppRunner trust relationship policy. While taking look at your code, I see that you are using trust related policy as like this:
// Create an IAM role for App runner
const appRunnerRole = new iam.Role(this, 'AppRunnerRoleTesting', {
assumedBy: new iam.ServicePrincipal('apprunner.amazonaws.com'),
});
However, according to the AWS AppRuner document[1], trust relationship should below look like this.
// Create an IAM role for App runner
const appRunnerRole = new iam.Role(this, 'AppRunnerRoleTesting', {
assumedBy: new iam.ServicePrincipal('build.apprunner.amazonaws.com'),
});
Here it is how the IAM role trust relationship policy looks like in IAM console.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "build.apprunner.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
Thus, I would humbly request you to please modify the code to add correct trust relationship policy and try to deploy. However, if you are still getting errors, I kindly request you to please reach out to our CDK team via AWS support case for further guidance on the same.
However, I have also found other way to create AppRunner service using CDK, mentioned in the article[2] and git hub link[3]. I kindly request you to please refer the same.
Thank you
References:
[2] https://aws.amazon.com/getting-started/guides/deploy-webapp-apprunner/module-one/
Hi Vaikiri,
Thanks for reaching out.
I made the changes to the code, but I'm still getting this error. I will go ahead and submit a support case with the CDK team.
Contenus pertinents
- demandé il y a un an
- Réponse acceptéedemandé il y a un an
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 4 mois
- AWS OFFICIELA mis à jour il y a 2 ans
Hi Vaikiri,
Thanks for reaching out.
I made the changes to the code, but I'm still getting this error. I will go ahead and submit a support case with the CDK team.