Lambda Function URL Sample SAM Application
This is a sample AWS SAM application to demonstrate the use of Lambda Function URL. Fork it and test it out.
Prerequisites:
- Installations: AWS CLI, AWS SAM
- Set the aws profile using AWS CLI.
- You will need to set the following secerts on your forked repo:
- AWS_ACCESS_KEY_ID: AWS Access Key ID
- AWS_SECRET_ACCESS_KEY: Corresponding Secret Access Key
- You need awscurl installed if you want to test using the provided script.
Instructions:
- Fork the repo.
- Set the secrets as displayed above.
- Clone to local.
sam build
to build a SAM template.sam pipeline bootstrap
to bootstrap the pipeline.sam pipeline init
to initialize the pipeline. You will need your forked repo url.
Testing:
Run ./test.sh
to run the scripts. It does the following:
- curls the Function URL with NO AUTH, resulting in a successful response,
- curls the Function URL with IAM AUTH, resulting in a forbidden response, and
- curls the Function URL with IAM AUTH using Sigv4 (
awscurl
), resulting in a successful response.