Skip to content
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

aws cdk --profile use toolkit set default_account error #8420

Closed
MarryYou opened this issue Jun 7, 2020 · 3 comments
Closed

aws cdk --profile use toolkit set default_account error #8420

MarryYou opened this issue Jun 7, 2020 · 3 comments
Assignees
Labels
bug This issue is a bug. p2 package/tools Related to AWS CDK Tools or CLI

Comments

@MarryYou
Copy link

MarryYou commented Jun 7, 2020

Ec2 Instance IAM in CDK environment does not have any permissions, all permissions come from AWS CLI credentials, and credentials are obtained through credential_process. How do I make it applicable in CDK

Reproduction Steps

such as: .aws/config profile
[profile staging]
region=ap-northeast-1
output=json
credential_process = "/home/ubuntu/staging.sh" "--username staging"

but found this error :
this is my cmd code
image
image

Error Log

error info
image

Environment

  • **CLI Version :1.44.0
  • Framework Version:
  • **Node.js Version:v10.21.0
  • **OS :*ubuntu *
  • **Language (Version):python(3.7)

Other

The account of ec2 instance is not the account of profile specified by me. How can I change it to make CDK run successfully?

Implement way

use python subprocess command line


This is 🐛 Bug Report

@MarryYou MarryYou added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 7, 2020
@SomayaB SomayaB added the package/tools Related to AWS CDK Tools or CLI label Jun 8, 2020
@shivlaks
Copy link
Contributor

shivlaks commented Jun 9, 2020

@MarryYou - have you already looked through #1656
Are you using credential_source? A workaround is suggested for getting around that as it's not currently supported.

@shivlaks shivlaks added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p2 labels Jun 10, 2020
@MarryYou
Copy link
Author

@shivlaks Hi shivlaks thank you for your reply. According to the issue you provided, I changed the way of using the certificate and now it can work normally.I suggest that assme Role be added to the credential usage of CDK, which is a common usage scenario.

@SomayaB SomayaB removed the needs-triage This issue or PR still needs to be triaged. label Jun 12, 2020
@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 13, 2020
@shivlaks
Copy link
Contributor

We do support assuming a role but I think I'll make some updates to our documentation and add some better examples.
Resolving this issue for now. Feel free to reopen if you have any outstanding questions or concerns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

3 participants