aws-samples / amazon-mwaa-examples

Amazon Managed Workflows for Apache Airflow (MWAA) Examples repository contains example DAGs, requirements.txt, plugins, and CloudFormation templates focused on Amazon MWAA.
MIT No Attribution
106 stars 61 forks source link

add lambda:TagResource to deployment action #63

Closed FumiakiKato closed 8 months ago

FumiakiKato commented 9 months ago

Issue #, if available: N/A

Description of changes: In the mwaa-public-webserver-custom-domain use case, the following permission error occurs when executing sam deploy.

Resource handler returned message: "User: arn:aws:sts::xxxx:assumed-role/public-mwaa-custom-domain-UsEast1DeploymentHandlerR-xxxx/public-mwaa-custom-domain-UsEast1DeploymentHandler-xxxx is not authorized to perform: lambda:TagResource on resource: arn:aws:lambda:us-east-1:xxxx:function:public-mwaa-custom-domain-ParseAuthHandler-xxxx because no identity-based policy allows the lambda:TagResource action (Service: Lambda, Status Code: 403, Request ID: xxxx)" (RequestToken: xxxx, HandlerErrorCode: AccessDenied)

This pull request resolves the issue.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.