Skip to content

ChrisAlister2347218/AWS

Repository files navigation

AWS Lambda Functions for Internshala Assignment

This repository contains two AWS Lambda functions as part of the Internshala assignment:

  1. Add Two Numbers Lambda Function
  2. Upload a File to S3 Lambda Function

Add Two Numbers Lambda Function

Function Description

This AWS Lambda function takes two numbers as input (num1 and num2) and returns their sum.

Lambda Code

View function

Deployment Steps

  1. Go to AWS Console → Lambda → Create Function
  2. Choose Python 3.x as runtime
  3. Assign IAM Role with AWSLambdaBasicExecutionRole
  4. Paste code from add_two_numbers_lambda.py
  5. Test with sample input:
{
  "num1": 5,
  "num2": 10
}

Upload a File to S3 Lambda Function

Function Description

This AWS Lambda function uploads a file to an Amazon S3 bucket using base64 encoding.

Prerequisites

  1. Create an S3 bucket
  2. Configure IAM permissions

Deployment Steps

  1. Create S3 bucket (e.g., my-lambda-bucket)
  2. Go to AWS Console → Lambda → Create Function
  3. Choose Python 3.x as runtime
  4. Assign IAM Role with AmazonS3FullAccess
  5. Test with sample input:
{
  "file_name": "test.pdf",
  "file_content": "BASE64_ENCODED_STRING"
}

Contact

For any issues, feel free to reach out.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages