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.
-
Clone this repository.
-
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.
-
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. -
Clean up. Both README files contain instructions for destroying the resources created in this project.
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.
There is no additional charge to use Terraform and SAM. With Terraform and SAM you are charged for the resources created by these tools.