AWS-SAM-Application GitHub Details, Stars and Alternatives | OpenRepoFinder
sam-rajan / repository
AWS-SAM-Application
This project contains source code and supporting files for an event-driven serverless application developed using AWS Serverless Application Model(SAM). This project is intended to demonstrate the usage of AWS SAM Template for provisioning different AWS serverless services and usage of AWS SAM CLI.
A transparent discovery signal based on current public GitHub metadata.
Recent activity35% weight
10
Community adoption25% weight
5
Maintenance state20% weight
100
License clarity10% weight
0
Project information10% weight
75
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
README preview
A Sample AWS SAM application
This project contains source code and supporting files for an event-driven serverless application developed using AWS Serverless Application Model(SAM). This project is intended to demonstrate the usage of AWS SAM Template for provisioning different AWS serverless services and usage of AWS SAM CLI.
Diagram Explained
This is an event driven payment meta data processing system which will extract payment details from a file and push it to databse. This application uses different AWS resources including Event Bridge, SNS, SQS, SES, DynamoDb and API Gateway. These resources are defined in the template.yaml file in this project.
Assume that a legacy system uploading all the payment metadata in file format to AWS S3 bucket(following file transfer integration style) after processing of payments. And these files are called receipts. The file sample-receipt within this project is a sample receipt file. Each line in the file represents a payment and its attributes are separated by tab space. There can be one or N number of payments in a file.
On receiving a file, S3 will log an event in cloud trail and these events are consumed by AWS EventBridge and trigger an AWS step function which has two AWS Lambda functions, ReceiptsReader and PaymentProcessor.
RecieptReader will read the file from S3 and upon successful completion, PaymentProcessor will extract the receipts and create payment objects. Failure in Reading or Processing will trigger an SNS event.
Once successful payment processing PaymentProcessor will post payment data to the SQS FIFO queue which is consumed by another AWS Lambda function called PaymentsPersistor .
As its name implies PaymentsPersistor persist payment data. It stores data in AWS Dynamo DB.
PaymentNotifier is another Lambda Function which notify the parties associated with a payment if that payment status is in pending.
All processed payments can be fetched via HTTP Rest Endpoint configured by AWS API gateway and backed by a Lambda function PaymentsRetriever.
Project Structure
env - Directory for keeping all evironment properties for testing environemnt
events - Directory which contains events which helps for local development. For generating an event use
sam local generate-event
which Generates sample payloads from different event sources, such as Amazon S3, Amazon API Gateway, and Amazon SNS
Functions - Directory contains Lambda Functions.
ALGORITHMICALLY RELATED
Similar Open-Source Projects
Selected from shared topics, language and repository description—not editorial ratings.
This repository contains all the assignments and projects completed by me during the course CSCI 5409 Advanced Topics in Cloud Computing at Dalhousie University in term Winter 2024 of my Master of Applied Computer Science (MACS) Program.
Layers - Contains shared code for Lambda Functions.
state-machines - Directory contains definitions for state machines.
samconfig.toml - AWS SAM CLI project-level configuration file that stores default parameters for its commands.
sample-receipt - Sample Receipts File.
serverless-architecture-diagram.drawio - Draw.io file for architecture diagram of this application.
template.yml - AWS SAM template file in which all the services and resources are specified.
Use the SAM CLI to build and test locally
For building the application, run:
$ sam build
The SAM CLI installs dependencies defined in package.json of each functions, creates a deployment package, and saves it in the .aws-sam/build folder.
Test a single function by invoking it directly with a test event. An event is a JSON document that represents the input that the function receives from the event source. Test events are included in the events folder in this project.
Run functions locally and invoke them with the sam local invoke command.
$ sam local invoke HelloWorldFunction --event events/event.json
The SAM CLI can also emulate application's API.
$ sam local start-api
$ curl http://localhost:3000/
Deploy the application
To deploy the application, run the following command:
$ sam deploy
The above command will take default parameters from samconfig.toml file. For resetting this, run the following command:
$ sam deploy --guided
which will start an interactive session with series of prompts.
Add a resource to your application
The application template uses AWS Serverless Application Model (AWS SAM) to define application resources. AWS SAM is an extension of AWS CloudFormation with a simpler syntax for configuring common serverless application resources such as functions, triggers, and APIs. For resources not included in the SAM specification, use standard AWS CloudFormation resource types.
Fetch, tail, and filter Lambda function logs
To simplify troubleshooting, SAM CLI has a command called sam logs. sam logs which helps fetching logs generated by deployed Lambda function from the command line.
$ sam logs -n <Function-Name> --stack-name <Stack-Name> --tail
Find more information and examples about filtering Lambda function logs in the SAM CLI Documentation.
This repository contains a comprehensive project focused on developing a serverless, microservice-driven Dining Concierge chatbot. This chatbot is designed to provide restaurant suggestions based on user preferences, leveraging AWS services