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

Create an IAM policy and Execution role #11

Closed
2 tasks done
nelsonic opened this issue Feb 12, 2020 · 2 comments
Closed
2 tasks done

Create an IAM policy and Execution role #11

nelsonic opened this issue Feb 12, 2020 · 2 comments

Comments

@nelsonic
Copy link
Member

nelsonic commented Feb 12, 2020

It's not possible to load the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables in AWS lambda see: dwyl/aws-lambda-deploy#58 (comment)
Which is why we are seeing the AccessDenied error #10 😞
There appears to be a way forward:
https://aws.amazon.com/premiumsupport/knowledge-center/lambda-send-email-ses

Todo:

  • Create the IAM policy and attach it to the LambdaExecRole
  • Test if that works!
@nelsonic
Copy link
Member Author

On the IAM policies homepage, select Policies and then Create policy:
https://console.aws.amazon.com/iam/home?region=eu-west-1#/policies
aws-iam-lambdases-01-home

Select the JSON tab and paste the json from the instructions, the click Review policy
https://aws.amazon.com/premiumsupport/knowledge-center/lambda-send-email-ses
aws-iam-lambdases-02-create

Review the policy and name it e.g: LambdaSES
aws-iam-lambdases-03-name
Cant share a link in this description, so just google for How do I send email using Lambda and Amazon SES

Once you click on Create policy you should see a confirmation LambdaSES has been created.:
aws-iam-lambdases-04-confirm

Next we need to attach the policy to the existing role.
Search for the policy, select it and then click on the Policy actions selector:
aws-iam-lambdases-05-policy-action

Attach the policy to the LambdaExecRole:
aws-iam-lambdases-06-policy-attach-to-role

Once you click the Attach policy button, you should see a confirmation similar to this:
aws-iam-lambdases-07-policy-attched-confirm

This stage is done.
Let's try and test it!

@nelsonic nelsonic added this to To do in dwyl app via automation Feb 12, 2020
@nelsonic nelsonic self-assigned this Feb 12, 2020
@nelsonic nelsonic moved this from To do to In progress in dwyl app Feb 12, 2020
@nelsonic
Copy link
Member Author

dwyl app automation moved this from In progress to Done Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
dwyl app
  
Done
Development

No branches or pull requests

1 participant