-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unauthorized tagging operation #13749
Comments
Hey @bergmorten, thank you for reaching. From the error message it appears the profile being used project does not have tagging permission for the KMS resource on a custom resource. |
I just verified my IAM profile and I'm member of admin group, and the policy of I've successfulle creared other custom resource before but not KMS and and with latest amplify CLI. |
Hey @bergmorten, we can check the profile the project is using in the |
Thanks I'll try this :-) |
@bergmorten do reach out to us if you are experiencing issues with this. |
@ykethan An delayed update ( took a few day off last week). First I tried to add inline policy for my IAM account:
This did not change anything. Then I tried to deploy via amplify console / continuous deploys trigger. This also resulted in the same error. Amplify console use the I need continuous deployment to work since I've multiple stacks/tenants which triggers deployment. I do not understand why |
@bergmorten retested this, but did not observe this behavior on my push. created a custom resource with the code provided and pushed modify the permissions to your requirements enabling only the permissions needed for the operation |
Very odd, I see that you have kms:* , while I only set kms:TagResource and kms:UnTagResource. Must I do re-login for the policy to be effective? Still I think it very odd that administrator access (you also has that) which has Action:* is not sufficient? Why is inline policy better than AWS managed roles? |
Hey @bergmorten, with AWS Admin access should have access to creating the resources. In my testing i used a user with Amplify Admin access which is a scoped policy for Amplify resources. I utilized the inline permission to provide additional permission which in your case should not be needed as it is AWS Admin access. |
Hey @bergmorten, could you try running |
@ykethan I do confirm that this did work. I did checkout of an another environment, which did not yet had custom backup pushed. Then updated my amplify -> aws profile setting, and after that a amplify pull & push worked :-) Thanks for your help. I think you should consider to make backup and a restore guide a part of the amplify tools and guides. It's a bit odd that a such important task is not part of amplify? |
Hey @bergmorten, we recently introduced Amplify Gen 2, which provides advanced customizations and integrations using CDK under the hood. |
Hi @bergmorten @ykethan , chiming in as I was having this issue as well trying to create a KMS Key through Amplify custom resource with CDK, been stalking this GH issue for clues 🤣 , and finally what worked for me was to update the |
Closing the issue due to inactivity. Do reach out to us if you are still experiencing this issue |
This issue is now closed. Comments on closed issues are hard for our team to see. |
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v20.12.2
Amplify CLI Version
12.11.1
What operating system are you using?
windows
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
nope
Describe the bug
I attempted to add a custom resource that enables a backup plan with a KMS key (based on https://aws.amazon.com/blogs/storage/automate-backups-for-aws-amplify-graphql-backends-with-aws-backup/).
I've updated the CDK and changed some names and the policy owner in the example code, which I do not believe is the issue (see attached CDK code if needed).
The error I receive does not seem relevant and links to an access policy that I do not process when I execute amplify push.
Is this an Amplify error, a cdk-script error or do I need to fellow the steps in the link?
cdk-stack.ts
Expected behavior
Should not complain about tagging permissions?
Reproduction steps
amplify add custom
amplify push
Project Identifier
Project Identifier: 0e0c35de10e80e85c555ebedce4575e5
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: