forked from aws-samples/aws-serverless-workshops
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updates for re:Invent 2018 SRV-326 Workshop (aws-samples#168)
* angular upgrade; new toast library had to be used as part of upgrade. * updates to toast and misc * amplify additions. * angular cli upgrade * angular cli upgrade * changes from cloud9 * amplify updates * changes based on global table * updates to failover stack; cognito unauth reqrmnt * updated package and deploy cli commands referencing new yaml files for primary and failover regions * updated failover region cli command * added notes where updates * added notes where changes are needed * can ignore section 2:Replicating the data * addded policy allowing table scan in failover region * update C9 environment. * cleanup instructions * updates to refresh table rows on form post. button to refresh region location. * doc updates df * doc updates df * Further doc updates * Update README_InstallDevDependencies.md * Cloud 9 Image * Update README_InstallDevDependencies.md * cloud9 image * image updates * image updates * Update README.md * Update README.md * Update README.md * Update README.md * Update README_InstallDevDependencies.md * Update README_InstallDevDependencies.md * Doc Updates - remove replication items * Update README.md * Update README.md * Image Additions * Image Additions * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Image Additions * Update README.md * Image Additions * Image Additions * Update README.md * Update README.md * Image Additions * Update README.md * Image Additions * Image Additions * Update README.md * Update README.md * Image Additions * Image Additions * Image Additions * Update README.md * Image Additions * Update README.md * Update README.md * Update README.md * Image Additions * Update README.md * Update README.md * Update README.md * Update README.md * Image Additions * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README_InstallDevDependencies.md * Update README_InstallDevDependencies.md * remove resource id's
- Loading branch information
1 parent
1e24799
commit 559f1a0
Showing
61 changed files
with
1,029 additions
and
714 deletions.
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
Description: SXR API Stack for failover region. | ||
|
||
Resources: | ||
|
||
TicketServiceAPI: | ||
Type: AWS::Serverless::Api | ||
Properties: | ||
StageName: prod | ||
DefinitionBody: | ||
swagger: 2.0 | ||
info: | ||
title: | ||
Ref: AWS::StackName | ||
paths: | ||
"/ticket": | ||
get: | ||
responses: {} | ||
x-amazon-apigateway-integration: | ||
uri: | ||
Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${TicketGetFunction.Arn}/invocations | ||
passthroughBehavior: "when_no_match" | ||
httpMethod: "POST" | ||
type: "aws_proxy" | ||
post: | ||
responses: {} | ||
x-amazon-apigateway-integration: | ||
uri: | ||
Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${TicketPostFunction.Arn}/invocations | ||
passthroughBehavior: "when_no_match" | ||
httpMethod: "POST" | ||
type: "aws_proxy" | ||
options: | ||
consumes: | ||
- "application/json" | ||
produces: | ||
- "application/json" | ||
responses: | ||
'200': | ||
description: "200 response" | ||
headers: | ||
Access-Control-Allow-Origin: | ||
type: "string" | ||
Access-Control-Allow-Methods: | ||
type: "string" | ||
Access-Control-Allow-Headers: | ||
type: "string" | ||
x-amazon-apigateway-integration: | ||
responses: | ||
default: | ||
statusCode: "200" | ||
responseParameters: | ||
method.response.header.Access-Control-Allow-Methods: "'POST,GET,OPTIONS'" | ||
method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'" | ||
method.response.header.Access-Control-Allow-Origin: "'*'" | ||
requestTemplates: | ||
application/json: "{\"statusCode\": 200}" | ||
passthroughBehavior: "when_no_match" | ||
type: "mock" | ||
"/health": | ||
get: | ||
responses: {} | ||
x-amazon-apigateway-integration: | ||
uri: | ||
Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${HealthFunction.Arn}/invocations | ||
passthroughBehavior: "when_no_match" | ||
httpMethod: "POST" | ||
type: "aws_proxy" | ||
options: | ||
consumes: | ||
- "application/json" | ||
produces: | ||
- "application/json" | ||
responses: | ||
'200': | ||
description: "200 response" | ||
headers: | ||
Access-Control-Allow-Origin: | ||
type: "string" | ||
Access-Control-Allow-Methods: | ||
type: "string" | ||
Access-Control-Allow-Headers: | ||
type: "string" | ||
x-amazon-apigateway-integration: | ||
responses: | ||
default: | ||
statusCode: "200" | ||
responseParameters: | ||
method.response.header.Access-Control-Allow-Methods: "'POST,GET,OPTIONS'" | ||
method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token'" | ||
method.response.header.Access-Control-Allow-Origin: "'*'" | ||
requestTemplates: | ||
application/json: "{\"statusCode\": 200}" | ||
passthroughBehavior: "when_no_match" | ||
type: "mock" | ||
swagger: '2.0' | ||
|
||
TicketGetFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: tickets-get.handler | ||
Runtime: nodejs6.10 | ||
FunctionName: TicketGetFunction | ||
Policies: | ||
- AWSLambdaDynamoDBExecutionRole #managed policy | ||
- Version: '2012-10-17' # Policy Document | ||
Statement: | ||
- Effect: Allow | ||
Action: | ||
- dynamodb:Scan | ||
- dynamodb:GetItem | ||
Resource: "*" | ||
Environment: | ||
Variables: | ||
TABLE_NAME: SXRTickets | ||
Events: | ||
GetResource: | ||
Type: Api | ||
Properties: | ||
Path: /ticket | ||
Method: get | ||
RestApiId: !Ref TicketServiceAPI | ||
|
||
TicketPostFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: tickets-post.handler | ||
Runtime: nodejs6.10 | ||
FunctionName: TicketPostFunction | ||
Policies: | ||
- AWSLambdaDynamoDBExecutionRole #managed policy | ||
- Version: '2012-10-17' # Policy Document | ||
Statement: | ||
- Effect: Allow | ||
Action: | ||
- dynamodb:PutItem | ||
Resource: "*" | ||
Environment: | ||
Variables: | ||
TABLE_NAME: SXRTickets | ||
Events: | ||
GetResource: | ||
Type: Api | ||
Properties: | ||
Path: /ticket | ||
Method: post | ||
RestApiId: !Ref TicketServiceAPI | ||
|
||
HealthFunction: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: health-check.handler | ||
Runtime: nodejs6.10 | ||
FunctionName: SXRHealthCheckFunction | ||
Policies: | ||
- AWSLambdaDynamoDBExecutionRole #managed policy | ||
- Version: '2012-10-17' # Policy Document | ||
Statement: | ||
- Effect: Allow | ||
Action: | ||
- dynamodb:Scan | ||
- dynamodb:GetItem | ||
Resource: "*" | ||
Environment: | ||
Variables: | ||
TABLE_NAME: SXRTickets | ||
Events: | ||
GetResource: | ||
Type: Api | ||
Properties: | ||
Path: /health | ||
Method: get | ||
RestApiId: !Ref TicketServiceAPI | ||
|
||
Outputs: | ||
ApiUrl: | ||
Description: URL of your API endpoint | ||
Value: !Join | ||
- '' | ||
- - https:// | ||
- !Ref TicketServiceAPI | ||
- '.execute-api.' | ||
- !Ref 'AWS::Region' | ||
- '.amazonaws.com/prod/' |
Oops, something went wrong.