https://github.com/antoonline/ansible-playbook-lambda-python-s3-s3-event
Deploy a Lambda Function, S3 and S3 Event using Ansible.
https://github.com/antoonline/ansible-playbook-lambda-python-s3-s3-event
ansible ansible-playbook aws aws-iam aws-lambda aws-s3 s3-event-trigger
Last synced: 3 months ago
JSON representation
Deploy a Lambda Function, S3 and S3 Event using Ansible.
- Host: GitHub
- URL: https://github.com/antoonline/ansible-playbook-lambda-python-s3-s3-event
- Owner: AntoOnline
- Created: 2021-07-20T16:52:27.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-01T03:30:57.000Z (about 2 years ago)
- Last Synced: 2025-01-14T08:14:07.403Z (5 months ago)
- Topics: ansible, ansible-playbook, aws, aws-iam, aws-lambda, aws-s3, s3-event-trigger
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Deploy a Lambda Function, S3 and S3 Event using Ansible #
This Ansible Playbook will deploy a Lambda function in AWS. The Lambda function
will then be used to run a dummy Python script to move files in the associated
S3 bucket. This code also provides a handy clean-up script.## Prerequisites ##
You will need the following to use this script:
- Ansible
- An AWS Account## Setup the Lambda Python Script ##
Enter the bucket name in python script.
1. Open move_s3_files.py
2. Replace "Enter-name-of-your-bucket" with proper name of your bucket.## Setup and Run the Ansible Deploy Script ##
To deploy the s3 bucket and lambda function on AWS.
1. Open deploy_lambda.yaml
2. Edit the Vars section with proper values.
3. To deploy and create lambda execute the below commands.```
ansible-playbook deploy.yaml
```## Setup and Run the Ansible Destroy Script ##
To destroy the s3 bucket and lambda function on AWS.
1. open destroy.yaml
2. Edit the Vars section with proper values.
3. Now to destroy aws resources execute the below commands.```
ansible-playbook destroy.yaml
```## Want to connect?
Feel free to contact me on [Twitter](https://twitter.com/OnlineAnto), [DEV Community](https://dev.to/antoonline/) or [LinkedIn](https://www.linkedin.com/in/anto-online) if you have any questions or suggestions.
Or just visit my [website](https://anto.online) to see what I do.