amazon-eks-ami
amazon-eks-ami copied to clipboard
Handle unset AWS_ACCESS_KEY_ID
Description of changes:
Use aws sts get-caller-identity
to check whether AWS CLI is installed, rather than the presence of an unnecessary AWS_ACCESS_KEY_ID variable (instance profiles, AWS CLI profiles, and others are reasons it's not necessary)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
thanks for this PR. related issue: https://github.com/awslabs/amazon-eks-ami/issues/527
@micahhausler @M00nF1sh could you please consider this?
I've updated this PR to use a better check now
We need to overhaul the way creds are handled with Packer in general -- we shouldn't be passing keys via env vars like this. I'm going to close this, because this approach isn't getting to the underlying issue.