AWS Lambda:
It lets you run code without provisioning or managing servers. You pay only for the compute time you consume.
With Lambda, you can run code for virtually any type of application or back-end service - all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.
Creating a Lambda Function:
step1: select lambda service from services
step2:
1. Give appropriate function name
2. select runtime environment (i am working on python3.6)
3. click on change execution and select Create a new role from AWS policy templates
4. Give appropriate role name and in template drop-down select s3 read only access
5. Create function click
Creating S3 Bucket:
Amazon S3 Access Points simplifies managing data access at scale
for applications using shared data sets on S3. With S3 Access Points,
you can now easily create hundreds of access points per bucket,
representing a new way of provisioning access to shared data sets.
Access Points provide a customized path into a bucket, with a unique
host-name and access policy that enforces the specific permissions and
network controls for any request made through the access point.
step1: In services select the s3 simple storage
step2: create the bucket with the proper name(unique name)
step3: after creating the bucket, go to bucket and select properties
step4: select events and click on add notification
step5: Select appropriate event name
step6: If the you want to trigger the lambda when ever new files is uploaded into s3, then select the put.
step7: On send to drop down select lambda_function
step8: In lambda function drop down select the lambda function which you have created earlier
step9: click on save . it will create an event for you lambda function
event creation |
Comments
Post a Comment