Skip to content

About

sample serverless twitterbot using AWS Lambda & AWS KMS

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Serverless Twitterbot

This twitterbot uses AWS Lambda and AWS Key Management Service. This twitterbot will tweet based on configured Cloudwatch Events

Requirements

  • Node.js 18+
  • AWS Lambda execution role with KMS decrypt permission
  • X (Twitter) app credentials

Configuration

Set the Lambda environment variable:

  • FN_ENCRYPTED_CONFIG: Base64 encoded KMS-encrypted JSON payload containing:
    • consumer_key
    • consumer_secret
    • access_token_key
    • access_token_secret

Example decrypted JSON:

{
  "consumer_key": "xxx",
  "consumer_secret": "xxx",
  "access_token_key": "xxx",
  "access_token_secret": "xxx"
}

Install

npm install

Deploy/Run Notes

  • Lambda handler: index.handler
  • Trigger from EventBridge/CloudWatch schedule to post periodically.
  • The tweet text uses Asia/Kolkata timezone.

About

sample serverless twitterbot using AWS Lambda & AWS KMS

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages