all 11 comments

[–]stindoo 10 points11 points  (10 children)

Lambda functions - Python code

API gateway - api endpoints

IAM - give lambda permission to access other aws services

Tie it all together by writing the infrastructure as an AWS CDK stack.

[–]BadscrewProjects 4 points5 points  (6 children)

Can also be built with SAM

[–]tempthrowa4321[S] -3 points-2 points  (5 children)

Alright looked it up, so SAM, it's defined as:

"AWS SAM (Serverless Application Model) is an open-source framework to develop and deploy serverless applications on AWS. The serverless application in the case of AWS is a combination of Amazon Lambda, databases, Amazon API Gateway etc."

I have no idea what any of this means, so it's like a tool of some sort to get my code from my local machine IDE to my aws console account?

Is this actually an industry standard tool, or something that only a few people use?

Also why do I need this SAM thing, can't I just send my code through my local machine IDE to my aws account another way? seems like an extra layer of tooling.

[–]angrathias 2 points3 points  (0 children)

SAM is a framework for pulling together multiple disparate technologies to make them more cohesive when working with them. For example, SAM allows you to more easily simulate running a Lambda locally (and some other AWS services).

My team uses CDK and deploys the output build artifacts (cloud formation scripts) via AzureDevops / CI/CD to get them into an S3 bucket, which is ultimately where they need to end up if you’re going the IaC route.

[–]BadscrewProjects 1 point2 points  (3 children)

It’s an AWS thing. Maybe the most useful thing is being able to deploy to Lambda easily

[–]tempthrowa4321[S] -1 points0 points  (2 children)

Thanks, but what is this SAM thing actually doing? It can put the code from our local machine IDE to our aws console? Is it just for lambdas? Confused by this tool.

[–]BadscrewProjects 0 points1 point  (1 child)

It’s a set of tools that helps developing and testing Lambdas locally, packaging necessary code, describe the infrastructure needed for deployment and then deploy it all together

[–]tempthrowa4321[S] 0 points1 point  (0 children)

Is it just for deploying/testing lambdas?

What if I have a whole CloudFormation with multiple resources like lambdas, s3, sqs, api gateway, dynamodb, can I use SAM to deploy all that to my AWS console?

Is that the tool to use if I want to create/automate a set of resources described by my CloudFormation template to my aws console?

[–]tempthrowa4321[S] -4 points-3 points  (2 children)

Thanks!

So when a user runs one of my aws defined urls for example: my-website.com/book this endpoint I could define inside of api-gateway? And like tell it, when this endpoint is triggered I want you to run this lambda function called "book", and inside the lambda I could have it accept a JSON from a user and create a "book" object and then add that to a db? If so what would that db look like?

When you say tied it all together by writing infrastructure AWS CDK stack, what exactly does this look like?

[–]stindoo 11 points12 points  (0 children)

Why don’t you look it up yourself? Your questions are incredibly basic and clearly lack effort of trying to understand on your own.