-
Notifications
You must be signed in to change notification settings - Fork 89
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
How to configure AWS credetials #50
Comments
Could this be better handled by assigning Roles to the Lambda? Then you don't need to put those secure credentials in the code. |
I have run into this same issue and am still looking for an answer. @digitalsushi the issue with this solution is that for my use case I am receiving temporary aws credentials from a curl POST command and then need to set the environment variables for my lambda function equal to the temporary credentials. Any insights on this would be greatly appreciated. Thanks! |
You should use the Lambda role. It uses it automatically. If you have a reason to use different credentials you could write them to
|
@gkrizek - thanks for the swift response. I do need to change he credentials, I had tried commands such as:
But kept getting errors saying that these types of environment variables are reserved and can't be changed in a lambda function as it's running. I'm kind of new to bash scripts... For the exports you mentioned above would I need to create the config and credential files in the script or do those already come as files inside the lambda functions /tmp file when it executes. thanks for the help! |
It seems that AWS CLI credentials are always being overwritten by IAM role lambda privileges, even if you export AWS_SHARED_CREDENTIALS_FILE and AWS_CONFIG_FILE. So far I haven't been able to find a workaround because using the Lambda role does the work for me, but there has to be a workaround... |
How to add ~/.aws credential folder to the lambda?. I tried directly exporting the variable in the code but it is not getting set.
handler () {
set -e
# Event Data is sent as the first parameter
EVENT_DATA=$1
echo $EVENT_DATA
}
The text was updated successfully, but these errors were encountered: