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
'use strict' | |
var AWS = require("aws-sdk"); | |
var https = require('https'); | |
var uuid = require ("uuid"); | |
AWS.config.update({ | |
region: "us-west-2" | |
}); |
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
--- | |
swagger: "2.0" | |
info: | |
version: "2017-12-20T14:48:08Z" | |
title: "swaggerMergeDemo" | |
host: "jdy6k2gmn1.execute-api.us-west-2.amazonaws.com" | |
basePath: "/test" | |
schemes: | |
- "https" | |
paths: |
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
--- | |
swagger: "2.0" | |
info: | |
version: "2017-12-20T14:48:08Z" | |
title: "swaggerMergeDemo" | |
host: "jdy6k2gmn1.execute-api.us-west-2.amazonaws.com" | |
basePath: "/test" | |
schemes: | |
- "https" | |
paths: |
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
--- | |
swagger: "2.0" | |
info: | |
version: "2017-12-20T14:48:08Z" | |
title: "swaggerMergeDemo" | |
host: "jdy6k2gmn1.execute-api.us-west-2.amazonaws.com" | |
basePath: "/test" | |
schemes: | |
- "https" | |
paths: |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"apigateway:GET" | |
], | |
"Resource": [ | |
"arn:aws:apigateway:*::/*", |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"apigateway:GET" | |
], | |
"Resource": [ | |
"arn:aws:apigateway:*::/*", |
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
LambdaFunction: | |
Type: AWS::Serverless::Function | |
Properties: | |
# Replace <bucket> with your bucket name | |
CodeUri: s3://<bucket>/srcCode.zip | |
Handler: index.handler | |
Runtime: nodejs12.x |
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
x-amazon-apigateway-integration: | |
responses: | |
default: | |
statusCode: 200 | |
# NOTE: ${LambdaFunction} must match the Lambda resourcename | |
uri: | |
Fn::Sub: "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${LambdaFunction.Arn}/invocations" |
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
ApiGatewayApi: | |
Type: AWS::Serverless::Api | |
Properties: | |
StageName: Prod | |
DefinitionBody: | |
'Fn::Transform': | |
Name: 'AWS::Include' | |
# Replace <bucket> with your bucket name | |
Parameters: |
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: | |
ApiFunction: | |
Type: AWS::Serverless::Function | |
Properties: | |
Environment: | |
Variables: | |
# this is a standard lambda env var | |
user: "This is a regular env var" | |
# this is a var loaded from SSM |
OlderNewer