Skip to content

Latest commit

 

History

History
 
 

example-serverless-app-reuse

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Examples that show how to reuse the serverless application in your own CloudFormation/SAM templates

This directory contains two examples:

This examples shows how you can add some users of your own to the serverless application's User Pool. Also it shows how you can access outputs from the serverless application.

This example shows how to wire up this solution's auth functions into your own CloudFront distribution. Features include:

  • An example private S3 bucket resource and parameter to name it
  • An example functional CloudFront distribution providing access to the bucket by Origin Access Identity
  • The nested reused serverless application stack resource illustrating how to pass your template's parameters to the application, in this case to modify http headers
  • An example showing how to retrieve output parameters from the nested application stack for use in the outer template
  • Parameterized semantic version to allow operation with future versions of the application
  • Note the instructions on updating the User Pool client in this example's description.

Deployment

You can deploy the examples as follows:

#!/bin/sh

STACK_NAME=my-protected-cloudfront-stack
TEMPLATE=reuse-complete.yaml # Or reuse-auth-only.yaml

sam deploy --template-file $TEMPLATE --stack-name $STACK_NAME \
           --capabilities CAPABILITY_IAM CAPABILITY_AUTO_EXPAND --region us-east-1

or simply launch the sample template in CloudFormation