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

IAM Instance Profile not available to "brand" user in user_data #23

Open
youanden opened this issue Apr 1, 2022 · 1 comment
Open

Comments

@youanden
Copy link

youanden commented Apr 1, 2022

It looks like the IAM instance profile user is not available when calling commands like:

su ${parameter["BRAND"]} -s /bin/bash -c "git init -b main"

and errors with:

The following profile does not have credentials configured: default. You must configure the access key and secret key for the profile. For more information, see Configure an AWS CLI Profile in the AWS CLI User Guide.

For now I've rewritten to:

cd ${parameter["WEB_ROOT_PATH"]}
git init -b main
git remote add origin ${parameter["CODECOMMIT_APP_REPO"]}
git fetch origin main
git reset origin/main --hard
chown -R ${parameter["BRAND"]}:${parameter["PHP_USER"]} .

I don't know how to delegate the IAM instance role to another user.

@magenx
Copy link
Owner

magenx commented Apr 2, 2022

configuration related to s3 instance profile and user data will be rewritten
also chown with many files can take very long time on startup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants