Skip to content

Instantly share code, notes, and snippets.

@andreidiaconu90
Created September 21, 2020 07:23
Show Gist options
  • Save andreidiaconu90/3f81f0027b6b21589c269a81b1a1e047 to your computer and use it in GitHub Desktop.
Save andreidiaconu90/3f81f0027b6b21589c269a81b1a1e047 to your computer and use it in GitHub Desktop.
cfn-role-serverless
service:my service
provider:
name: aws
runtime: nodejs12.x
region: my-region
profile: default
apiGateway:
binaryMediaTypes:
- "application/octet-stream"
plugins:
- serverless-dynamodb-local
- serverless-plugin-ifelse
[...]
custom:
serverlessIfElse:
- If: '" ${env:STAGE}" === "prod"'
Exclude:
- provider.profile
Set: provider.cfnRole = "arn:aws:iam::<AwsAccountId>:role/my-pipeline-role"
- If: '" ${env:STAGE}" === "staging"'
Exclude:
- provider.profile
Set: provider.cfnRole = "arn:aws:iam::<AwsAccountId>:role/my-pipeline-role"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment