-
Notifications
You must be signed in to change notification settings - Fork 428
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
Can't create env in a different account (not authorized to perform: kms:UntagResource) #1199
Comments
Oh that's definitely odd - we don't try to untag KMS keys. This is happening when you run Did you find this error in the CloudFormation stack? Thanks for your help, hope we can get this resolved quickly! |
Here's the exact command I was running:
Aye! |
Super helpful - thank you! A few more questions that maybe you can help me out with. Are you trying to spin up this environment in eu-central-1 (is that why you're using AWS_DEFAULT_REGION?) Second, which region is the stack |
Correct.
It’s also in |
Ok even more questions for you! (thank you so much for your time! I realize this is super inconvenient for you). Did you happen to use the additional --resource-tags feature when you set up your app the first time? If you can't remember, you can look at the tags that are part of your CloudFormation stack. I was able to reproduce it. Let me dig a little deeper and figure out how to help you out! |
So after investigating this, I can confirm that adding the Super interesting, I'll reach out to the KMS/CloudFormation team to dive deeper into what's going on (but checking CloudTrail it looks like there are a few empty tag/untag requests... hmm!). In the mean time, there isn't a great remediation story I can help you with. You can add the policy to your KMS key, but that value will be overwritten when the StackSet is updated. I'll fork and build some binaries with a fix patched in that you can use - but I'll have to do that tomorrow. |
I did, yep :)
No rush. This is just a toy app I'm using to figure out a good workflow. I can just recreate it without the resource tags. Thank you so much for your support and the work you're doing here. Everything looks very very promising! |
I tried setting everything up from scratch without
|
There seems to be an issue with the current KMS CF resource that is causing superfluous tag/untag calls. This new permission fixes that issue. A customer encountered this issue (aws#1199) when using resource tags, so I've also updated the e2e tests to include setting resource tags. In the future, this permission will be useful if we want to support updating tags at the app level (removing a tag, for example) so it's not entierly a hack :)
There seems to be an issue with the current KMS CF resource that is causing superfluous tag/untag calls. This new permission fixes that issue. A customer encountered this issue (#1199) when using resource tags, so I've also updated the e2e tests to include setting resource tags. In the future, this permission will be useful if we want to support updating tags at the app level (removing a tag, for example) so it's not entierly a hack :) Fixes #1199 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Thank you for your patience again. So we dug into this - and it looks like this was a recent change introduced to the KMS CloudFormation resource. We spoke with them and they're in the process of fixing it 🎊 Thank you so much in helping us find this! In the mean time, we've merged our own fix into Copilot. |
Beautiful, thanks @kohidave 🎉 |
I tried creating a new environment in a different AWS account but ran into an issue with
KMSKey
.I can see that the key policy on
arn:aws:kms:eu-central-1:123:key/def-456
does not allowkms:UntagResource
.CLI version: 0.2.0
The text was updated successfully, but these errors were encountered: