Created
October 15, 2020 17:14
-
-
Save stympy/9783ca118c724a4e0f23019f631e87c3 to your computer and use it in GitHub Desktop.
Creating resources in only one region when deploying to multiple regions with the serverless framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: hook-relay | |
provider: | |
name: aws | |
custom: | |
resources: | |
us-east-1: ${file(./resources/timestream.yml)} # The resources that should be created in just one region | |
resources: | |
- ${file(./resources/main.yml)} # All the resources that should be created in each region, like queues, etc. | |
- ${self:custom.resources.${self:provider.region}, ''} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Resources: | |
tsdb: | |
Type: AWS::Timestream::Database | |
Properties: | |
DatabaseName: "hook-relay-${self:custom.stage}" | |
tsdeliveries: | |
Type: AWS::Timestream::Table | |
Properties: | |
DatabaseName: !Ref tsdb | |
TableName: deliveries | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment