Streamlining Email Notifications with AWS Lambda, Python, and SES
Deploying A Lambda Function with Terraform To Automated Emails Using Python, Boto3, and AWS SES.
What I will be covering in this blog post
In the last blog post, I configured AWS SSO with Okta using Terraform. While setting up the single sign-on for AWS with Okta, I created a service user account and used the access key and secret to provision the Okta application.
Leaving the secret keys idle for a long time poses a security risk and should be rotated regularly.
To address this, I will be creating an AWS lambda that will send me a reminder email whenever the access key is about to expire(let's say 90 days is the expiration date).
I will manually rotate the keys and update the Okta application with the new key.
As of now, the public API endpoint to update the keys in the Okta Saml app is not available. Once it is available, I will add the code to automatically update the keys in the Okta app with new keys using Python, boto3, and Okta APIs.
Also read: A Complete Guide To Serverless On AWS With Lambda