Skip to content

Instantly share code, notes, and snippets.

@croosen
Created May 6, 2019 10:24
Show Gist options
  • Save croosen/595ee699959746f829926f8f6bc9d7f7 to your computer and use it in GitHub Desktop.
Save croosen/595ee699959746f829926f8f6bc9d7f7 to your computer and use it in GitHub Desktop.
# import your swagger to apigateway
$ aws apigateway import-rest-api --fail-on-warnings --body file://swagger.json
# update cloudformation template
$ aws cloudformation update-stack --stack-name $your-stack-name --template-body file://template.json --capabilities CAPABILITY_IAM --parameters ParameterKey=S3Bucket,UsePreviousValue=true ParameterKey=S3Key,UsePreviousValue=true ParameterKey=ApiId,ParameterValue=$ApiId
# deploy to stage v1
$ aws apigateway create-deployment --rest-api-id $ApiId --stage-name v1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment