diff --git a/.ebextensions/create-dynamodb-table.config b/.ebextensions/create-dynamodb-table.config new file mode 100644 index 0000000..287d949 --- /dev/null +++ b/.ebextensions/create-dynamodb-table.config @@ -0,0 +1,7 @@ +Resources: + StartupSignupsTable: + Type: AWS::DynamoDB::Table + Properties: + KeySchema: + HashKeyElement: {AttributeName: email, AttributeType: S} + ProvisionedThroughput: {ReadCapacityUnits: 1, WriteCapacityUnits: 1} diff --git a/.ebextensions/resources.config b/.ebextensions/create-sns-topic.config similarity index 70% rename from .ebextensions/resources.config rename to .ebextensions/create-sns-topic.config index 11396fd..6c58e92 100644 --- a/.ebextensions/resources.config +++ b/.ebextensions/create-sns-topic.config @@ -1,10 +1,4 @@ Resources: - StartupSignupsTable: - Type: AWS::DynamoDB::Table - Properties: - KeySchema: - HashKeyElement: {AttributeName: email, AttributeType: S} - ProvisionedThroughput: {ReadCapacityUnits: 1, WriteCapacityUnits: 1} NewSignupQueue: Type: AWS::SQS::Queue NewSignupTopic: @@ -12,7 +6,7 @@ Resources: Properties: Subscription: - Endpoint: - Fn::GetOptionSetting: {DefaultValue: nobody@amazon.com, OptionName: NewSignupEmail} + Fn::GetOptionSetting: {DefaultValue: nobody@example.com, OptionName: NewSignupEmail} Protocol: email - Endpoint: Fn::GetAtt: [NewSignupQueue, Arn] diff --git a/.ebextensions/options.config b/.ebextensions/options.config index cfe0c7e..ba195a9 100644 --- a/.ebextensions/options.config +++ b/.ebextensions/options.config @@ -1,9 +1,11 @@ option_settings: + aws:elasticbeanstalk:customoption: + NewSignupEmail: me@example.com aws:elasticbeanstalk:application:environment: THEME: "flatly" - AWS_REGION: '`{ "Ref" : "AWS::Region"}`' - STARTUP_SIGNUP_TABLE: '`{ "Ref" : "StartupSignupsTable"}`' - NEW_SIGNUP_TOPIC: '`{ "Ref" : "NewSignupTopic"}`' + AWS_REGION: '`{"Ref" : "AWS::Region"}`' + STARTUP_SIGNUP_TABLE: '`{"Ref" : "StartupSignupsTable"}`' + NEW_SIGNUP_TOPIC: '`{"Ref" : "NewSignupTopic"}`' aws:elasticbeanstalk:container:nodejs: ProxyServer: nginx aws:elasticbeanstalk:container:nodejs:staticfiles: