Skip to content

Latest commit

 

History

History

terraform-sam-integration

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Terraform / AWS SAM integration example project

Terraform is an open-source infrastructure as code software tool that provides a consistent CLI workflow to manage cloud services. AWS Serverless Application Model (SAM) is an open-source framework for building serverless applications. Teams that choose to use both Terraform and SAM need a simple way to share resource configurations between tools. AWS Systems Manager Parameter Store (SSM) can bridge this gap by providing secure, hierarchical storage for configuration data management and secrets management. This project demonstrates how to create a simple app using Terraform, SAM and SSM Parameter Store.

Setup the project

  1. Clone this repository.

  2. Follow the directions in this README to create resources with Terraform. The Terraform file in this folder will create an Amazon SQS queue and store its arn in the SSM Parameter Store.

  3. Follow the directions in this README to create resources with SAM. This SAM application will create an AWS Lambda function that uses the SQS queue as its event source. Notice in particular the AWS CloudFormation dynamic reference contained in the template.yaml file that retrieves the SQS queue arn stored in SSM Parameter Store.

  4. Clean up. Both README files contain instructions for destroying the resources created in this project.

Costs

Systems Manager Parameter Store

The standard-parameter tier is the default tier when you begin to use Parameter Store. Using the standard-parameter tier, you can create 10,000 parameters for each AWS Region in an AWS account. The content size of each parameter can equal a maximum of 4 KB. There is no additional charge to use the standard-parameter tier.

Use the advanced-parameter tier to create a maximum of 100,000 parameters for each AWS Region in an AWS account. The content size of each parameter can equal a maximum of 8 KB. There is a charge to use the advanced-parameter tier.

Terraform and SAM

There is no additional charge to use Terraform and SAM. With Terraform and SAM you are charged for the resources created by these tools.