This file contains hidden or 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
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: Example Event API EventBridge | |
Parameters: | |
Environment: | |
Default: 'Dev' | |
Type: String | |
Resources: |
This file contains hidden or 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
EventsTopic: | |
Type: "AWS::SNS::Topic" | |
Properties: | |
TopicName: !Sub "Example-events-topic" | |
Event3Rule: | |
Type: AWS::Events::Rule | |
Properties: | |
Description: "EventSNSRule" | |
EventBusName: exampleEventBus |
This file contains hidden or 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": "0", | |
"id": "d81e67a7-9917-52c0-e11d-4270e6ddf39a", | |
"detail-type": "ExampleEventsDetailType", | |
"source": "com.alite.example", | |
"account": "750670XXXXXX", | |
"time": "2020-08-19T16:56:56Z", | |
"region": "eu-west-1", | |
"resources": [], | |
"detail": { |
This file contains hidden or 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
#set($msgBody = $input.body) | |
#set($context.requestOverride.header['X-Amz-Target'] = "AWSEvents.PutEvents") | |
#set($context.requestOverride.header['Content-Type'] = "application/x-amz-json-1.1") | |
{ | |
"Entries": [ | |
{ | |
"Source":"com.alite.example", | |
"Detail": "$util.escapeJavaScript($msgBody).replaceAll("\\'","'")", | |
"DetailType": "ExampleEventsDetailType", | |
"EventBusName": "exampleEventBus" |
This file contains hidden or 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
responseParameters: | |
method.response.header.Access-Control-Allow-Origin: "'*'" | |
responseTemplates: | |
application/json: |- | |
#set($inputRoot = $input.path('$')) | |
{ | |
"policy": { | |
"minimumLength": "$inputRoot.UserPool.Policies.PasswordPolicy.MinimumLength", | |
"requireLowercase": "$inputRoot.UserPool.Policies.PasswordPolicy.RequireLowercase", | |
"requireNumbers": "$inputRoot.UserPool.Policies.PasswordPolicy.RequireNumbers", |
This file contains hidden or 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
CognitoExecutionRole: | |
Type: AWS::IAM::Role | |
Properties: | |
AssumeRolePolicyDocument: | |
Version: '2012-10-17' | |
Statement: | |
- Effect: Allow | |
Principal: | |
Service: | |
- apigateway.amazonaws.com |
This file contains hidden or 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: | |
httpMethod: POST | |
type: AWS | |
uri: !Sub "arn:aws:apigateway:${AWS::Region}:cognito-idp:action/DescribeUserPool" |
This file contains hidden or 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: | |
UtilityApi: | |
Type: AWS::Serverless::Api | |
Properties: | |
DefinitionBody: | |
.... | |
paths: | |
cognito/password/policy: | |
get: | |
... |