Skip to content

Instantly share code, notes, and snippets.

@kapilt
Last active May 26, 2019 11:34
Show Gist options
  • Save kapilt/1794c092cd2f17e0faadb3e00a44bc33 to your computer and use it in GitHub Desktop.
Save kapilt/1794c092cd2f17e0faadb3e00a44bc33 to your computer and use it in GitHub Desktop.
chalice terraform

tldr

  • chalice create 34.2s
  • chalice destroy 2.8s
  • chalice package 0.95s
  • terraform apply 15.6s
  • terraform destroy 5.2s

Chalice Create

$ make up-chalice
time chalice deploy
Creating deployment package.
Creating IAM role: burnify-dev
Creating lambda function: burnify-dev-sfn_account_create
Creating lambda function: burnify-dev-sfn_account_create_poll
Creating lambda function: burnify-dev-sfn_account_build
Creating lambda function: burnify-dev-lease_gc
Creating lambda function: burnify-dev
Updating rest API
Deleting function: arn:aws:lambda:us-east-1:619193117841:function:accountmgr-dev-sfn_account_release
Deleting function: arn:aws:lambda:us-east-1:619193117841:function:accountmgr-dev-sfn_account_create_complete
Deleting function: arn:aws:lambda:us-east-1:619193117841:function:accountmgr-dev-sfn_account_create_build
Resources deployed:
  - Lambda ARN: arn:aws:lambda:us-east-1:619193117841:function:burnify-dev-sfn_account_create
  - Lambda ARN: arn:aws:lambda:us-east-1:619193117841:function:burnify-dev-sfn_account_create_poll
  - Lambda ARN: arn:aws:lambda:us-east-1:619193117841:function:burnify-dev-sfn_account_build
  - Lambda ARN: arn:aws:lambda:us-east-1:619193117841:function:burnify-dev-lease_gc
  - Lambda ARN: arn:aws:lambda:us-east-1:619193117841:function:burnify-dev
  - Rest API URL: https://ws49krnpj2.execute-api.us-east-1.amazonaws.com/dev/
       34.19 real         0.83 user         0.12 sys

Chalice destroy

make down-chalice         
time chalice delete              
Deleting Rest API: ws49krnpj2         
Deleting function: arn:aws:lambda:us-east-1:619193117841:function:burnify-dev
Deleting function: arn:aws:lambda:us-east-1:619193117841:function:burnify-dev-lease_gc
Deleting function: arn:aws:lambda:us-east-1:619193117841:function:burnify-dev-sfn_account_build
Deleting function: arn:aws:lambda:us-east-1:619193117841:function:burnify-dev-sfn_account_create_poll
Deleting function: arn:aws:lambda:us-east-1:619193117841:function:burnify-dev-sfn_account_create
Deleting IAM role: burnify-dev
        2.78 real         0.65 user         0.10 sys

Chalice Package

$ make up-terraform
time chalice package --pkg-format=terraform pkg
Creating deployment package.
0.95 real 0.55 user 0.09 sys

Terraform Create

Apply complete! Resources: 14 added, 0 changed, 0 destroyed.

real    0m15.597s
user    0m1.559s

sys 0m0.581s

Terraform Destroy

terraform is doing additional api calls/checking to verify resource deletion.

Destroy complete! Resources: 14 destroyed.

real    0m5.158s
up-chalice:
time chalice deploy
down-chalice:
time chalice delete
up-terraform:
time chalice package --pkg-format=terraform pkg
cd pkg && time terraform apply -auto-approve
down-terraform:
cd pkg && time terraform destroy -auto-approve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment