AWS Lambda Function to send an initial password to a new user via Slack DM
IAM User name and Slack's display name must be same.
When an IAM User is created, the Lambda Function is triggered via CloudWatch Event. The function searches the Slack User with IAM User name. If the IAM User isn't found, the function notifies that the IAM User is created to a Slack channel.
If the IAM User is found, the function creates the IAM User's login profile and sends the initial password to the user via Slack DM.
If the login profile already exists, the password is changed by default. This behavior can be changed.
Please see here
Please see here
- chat:write (chat.postMessage)
- users:read (users.list)
This function needs a DynamoDB table. Please see here.