1

I am working on some sample assignment. My requirement is as follows:

  • I should create one POST API using AWS API Gateway.
  • API Gateway should invoke an AWS Lambda function.
  • The API should send employee details like name, dob etc.
  • The Lambda function should store employee details in Amazon S3.
  • Later I should be able to query employee details using Amazon Athena.
  • For this also I should create a Lambda function then integrate it with API Gateway GET API.

I created a CloudFormation template to create API Gateway. Now I am starting to create the Lambda function using c#. I am a dotnet developer but this kind of work I am doing first time.

For the above requirement what kind of application I should create in .Net? Console application or API application? Because my API will send input in json format and my Lambda function should be able to catch the inputs and store it in S3.

Can I store data in separate json files in S3 so that it can be queried using Amazon Athena?

After that if I am using webapi application then can I create some project using vscode that I deploy directly to Lambda? If so, where can I specify my AWS credentials in my vscode?

All these things I am doing first time can someone help me to follow appropriate steps to do above assignment? Any help would be appreciated.

1 Answer 1

1

For the above requirement what kind of application I should create in .Net? Console application or API application?

You would create a Visual Studio .NET Core Lambda Project.


Can I store data in separate json files in S3 so that it can be queried using Amazon Athena?

Yes, you can.


After that if I am using webapi application then can I create some project using vscode that I deploy directly to Lambda? If so, where can I specify my AWS credentials in my vscode?

To publish your function to Lambda: In Solution Explorer, right-click the project, and then choose Publish to AWS Lambda. You will be prompted to create an AWS account profile. You can also use the command:

dotnet lambda deploy-function

Make sure your lambda function has the right IAM Role and security policy to do its job.

More info here:

https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/lambda-creating-project-in-visual-studio.html

https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/lambda-cli-publish.html

https://aws.amazon.com/blogs/compute/developing-net-core-aws-lambda-functions/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.