justinram11 / serverless-aws-batch

MIT License
26 stars 26 forks source link

Documentation issue wrt access key env vars #21

Open cwells opened 3 years ago

cwells commented 3 years ago

The docs say:

Note: Currently using copy of the docker images (https://cloud.docker.com/u/justinram11/repository/list) that unsets the ACCESS_KEY_ID and SECRET_ACCESS_KEY environmental variables so that we can use the role attached to the EC2 instance.

However, inspecting the environment, I see this instead:

AWS_ACCESS_KEY_ID="SOME_ACCESS_KEY_ID"
AWS_SECRET_ACCESS_KEY="SOME_SECRET_ACCESS_KEY"

Unsurprisingly, this results in this type of error when attempting to access a resource such as S3:

An error occurred (InvalidAccessKeyId) when calling the GetObject operation: The AWS Access Key Id you provided does not exist in our records.

Explicitly unsetting the vars in my lambda code resolves the issue, but is kind of inconvenient. In any case, the docs should reflect the actual behavior.