Hi all,
I am trying to invoke a lambda to send ses email(my actual gmail) using localstack container on docker.
I would like to ask if this is actually possible. I have tried using the actual AWS Console to use a lambda that send an SES email to my email(this is working).
The steps I have taken in localstack:
Configure my docker compose.yml file which includes my actual AWS access key ID and secret access key, my region which is in ap-southeast-1.
I zipped my python file which has the lambda function to send an ses email and cp into my localstack container.
I used aws configure and make sure the user is correct etc.
I used the create function lambda as follows:
awslocal lambda create-function
–function-name send
–runtime python3.10
–zip-file fileb:///test1.zip
–handler test1.lambda_handler
–role arn:aws:iam::adadawsdasd:role/xxx (indicated my actual role based on my AWS official role that has permission to execute lambda and send email)
I then tried to invoke the function
awslocal lambda invoke --function-name send output.txt
after invoking the function, I have an error which states invalid security token ID, my guess is that there is something wrong with the way I configure my AWS Credentials in localstack.
I have been stuck on this issue for several days(currently doing for one of my school project).
All help is appreciated! thank you.