Created
October 10, 2021 09:59
-
-
Save kaihendry/8ca2039b12cedf4c5f7c3e049333f439 to your computer and use it in GitHub Desktop.
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: | |
WidgetsWidgetStore0ED7FDB7: | |
Type: AWS::S3::Bucket | |
UpdateReplacePolicy: Retain | |
DeletionPolicy: Retain | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/WidgetStore/Resource | |
WidgetsWidgetHandlerServiceRole8C2B589C: | |
Type: AWS::IAM::Role | |
Properties: | |
AssumeRolePolicyDocument: | |
Statement: | |
- Action: sts:AssumeRole | |
Effect: Allow | |
Principal: | |
Service: lambda.amazonaws.com | |
Version: "2012-10-17" | |
ManagedPolicyArns: | |
- Fn::Join: | |
- "" | |
- - "arn:" | |
- Ref: AWS::Partition | |
- :iam::aws:policy/service-role/AWSLambdaBasicExecutionRole | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/WidgetHandler/ServiceRole/Resource | |
WidgetsWidgetHandlerServiceRoleDefaultPolicyA8E097C8: | |
Type: AWS::IAM::Policy | |
Properties: | |
PolicyDocument: | |
Statement: | |
- Action: | |
- s3:GetObject* | |
- s3:GetBucket* | |
- s3:List* | |
- s3:DeleteObject* | |
- s3:PutObject | |
- s3:Abort* | |
Effect: Allow | |
Resource: | |
- Fn::GetAtt: | |
- WidgetsWidgetStore0ED7FDB7 | |
- Arn | |
- Fn::Join: | |
- "" | |
- - Fn::GetAtt: | |
- WidgetsWidgetStore0ED7FDB7 | |
- Arn | |
- /* | |
Version: "2012-10-17" | |
PolicyName: WidgetsWidgetHandlerServiceRoleDefaultPolicyA8E097C8 | |
Roles: | |
- Ref: WidgetsWidgetHandlerServiceRole8C2B589C | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/WidgetHandler/ServiceRole/DefaultPolicy/Resource | |
WidgetsWidgetHandler1BC9DB34: | |
Type: AWS::Lambda::Function | |
Properties: | |
Code: | |
S3Bucket: | |
Ref: AssetParameters06fc0e0c40464e675be143470bf55de82934f121e21e207249945f258a8717cfS3Bucket1DBA403C | |
S3Key: | |
Fn::Join: | |
- "" | |
- - Fn::Select: | |
- 0 | |
- Fn::Split: | |
- "||" | |
- Ref: AssetParameters06fc0e0c40464e675be143470bf55de82934f121e21e207249945f258a8717cfS3VersionKey975AA635 | |
- Fn::Select: | |
- 1 | |
- Fn::Split: | |
- "||" | |
- Ref: AssetParameters06fc0e0c40464e675be143470bf55de82934f121e21e207249945f258a8717cfS3VersionKey975AA635 | |
Role: | |
Fn::GetAtt: | |
- WidgetsWidgetHandlerServiceRole8C2B589C | |
- Arn | |
Environment: | |
Variables: | |
BUCKET: | |
Ref: WidgetsWidgetStore0ED7FDB7 | |
Handler: widgets.main | |
Runtime: nodejs10.x | |
DependsOn: | |
- WidgetsWidgetHandlerServiceRoleDefaultPolicyA8E097C8 | |
- WidgetsWidgetHandlerServiceRole8C2B589C | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/WidgetHandler/Resource | |
aws:asset:path: asset.06fc0e0c40464e675be143470bf55de82934f121e21e207249945f258a8717cf | |
aws:asset:property: Code | |
Widgetswidgetsapi72353315: | |
Type: AWS::ApiGateway::RestApi | |
Properties: | |
Description: This service serves widgets. | |
Name: Widget Service | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/Resource | |
WidgetswidgetsapiCloudWatchRole8C2A5801: | |
Type: AWS::IAM::Role | |
Properties: | |
AssumeRolePolicyDocument: | |
Statement: | |
- Action: sts:AssumeRole | |
Effect: Allow | |
Principal: | |
Service: apigateway.amazonaws.com | |
Version: "2012-10-17" | |
ManagedPolicyArns: | |
- Fn::Join: | |
- "" | |
- - "arn:" | |
- Ref: AWS::Partition | |
- :iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/CloudWatchRole/Resource | |
WidgetswidgetsapiAccountDA847A77: | |
Type: AWS::ApiGateway::Account | |
Properties: | |
CloudWatchRoleArn: | |
Fn::GetAtt: | |
- WidgetswidgetsapiCloudWatchRole8C2A5801 | |
- Arn | |
DependsOn: | |
- Widgetswidgetsapi72353315 | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/Account | |
WidgetswidgetsapiDeployment406A9BD66039252bdc49ee37076fc3c8f3a2eed8: | |
Type: AWS::ApiGateway::Deployment | |
Properties: | |
RestApiId: | |
Ref: Widgetswidgetsapi72353315 | |
Description: Automatically created by the RestApi construct | |
DependsOn: | |
- WidgetswidgetsapiidDELETEE81619C6 | |
- WidgetswidgetsapiidGETABE1C648 | |
- WidgetswidgetsapiidPOST60B9DB49 | |
- WidgetswidgetsapiidAA19CFA8 | |
- WidgetswidgetsapiGET2086C825 | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/Deployment/Resource | |
WidgetswidgetsapiDeploymentStageprod0D8CD1B7: | |
Type: AWS::ApiGateway::Stage | |
Properties: | |
RestApiId: | |
Ref: Widgetswidgetsapi72353315 | |
DeploymentId: | |
Ref: WidgetswidgetsapiDeployment406A9BD66039252bdc49ee37076fc3c8f3a2eed8 | |
StageName: prod | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/DeploymentStage.prod/Resource | |
WidgetswidgetsapiGETApiPermissionMyWidgetServiceStackWidgetswidgetsapi6BAE39EFGETFA317FE0: | |
Type: AWS::Lambda::Permission | |
Properties: | |
Action: lambda:InvokeFunction | |
FunctionName: | |
Fn::GetAtt: | |
- WidgetsWidgetHandler1BC9DB34 | |
- Arn | |
Principal: apigateway.amazonaws.com | |
SourceArn: | |
Fn::Join: | |
- "" | |
- - "arn:" | |
- Ref: AWS::Partition | |
- ":execute-api:" | |
- Ref: AWS::Region | |
- ":" | |
- Ref: AWS::AccountId | |
- ":" | |
- Ref: Widgetswidgetsapi72353315 | |
- / | |
- Ref: WidgetswidgetsapiDeploymentStageprod0D8CD1B7 | |
- /GET/ | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/Default/GET/ApiPermission.MyWidgetServiceStackWidgetswidgetsapi6BAE39EF.GET.. | |
WidgetswidgetsapiGETApiPermissionTestMyWidgetServiceStackWidgetswidgetsapi6BAE39EFGETD6697AB5: | |
Type: AWS::Lambda::Permission | |
Properties: | |
Action: lambda:InvokeFunction | |
FunctionName: | |
Fn::GetAtt: | |
- WidgetsWidgetHandler1BC9DB34 | |
- Arn | |
Principal: apigateway.amazonaws.com | |
SourceArn: | |
Fn::Join: | |
- "" | |
- - "arn:" | |
- Ref: AWS::Partition | |
- ":execute-api:" | |
- Ref: AWS::Region | |
- ":" | |
- Ref: AWS::AccountId | |
- ":" | |
- Ref: Widgetswidgetsapi72353315 | |
- /test-invoke-stage/GET/ | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/Default/GET/ApiPermission.Test.MyWidgetServiceStackWidgetswidgetsapi6BAE39EF.GET.. | |
WidgetswidgetsapiGET2086C825: | |
Type: AWS::ApiGateway::Method | |
Properties: | |
HttpMethod: GET | |
ResourceId: | |
Fn::GetAtt: | |
- Widgetswidgetsapi72353315 | |
- RootResourceId | |
RestApiId: | |
Ref: Widgetswidgetsapi72353315 | |
AuthorizationType: NONE | |
Integration: | |
IntegrationHttpMethod: POST | |
RequestTemplates: | |
application/json: '{ "statusCode": "200" }' | |
Type: AWS_PROXY | |
Uri: | |
Fn::Join: | |
- "" | |
- - "arn:" | |
- Ref: AWS::Partition | |
- ":apigateway:" | |
- Ref: AWS::Region | |
- :lambda:path/2015-03-31/functions/ | |
- Fn::GetAtt: | |
- WidgetsWidgetHandler1BC9DB34 | |
- Arn | |
- /invocations | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/Default/GET/Resource | |
WidgetswidgetsapiidAA19CFA8: | |
Type: AWS::ApiGateway::Resource | |
Properties: | |
ParentId: | |
Fn::GetAtt: | |
- Widgetswidgetsapi72353315 | |
- RootResourceId | |
PathPart: "{id}" | |
RestApiId: | |
Ref: Widgetswidgetsapi72353315 | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/Default/{id}/Resource | |
WidgetswidgetsapiidPOSTApiPermissionMyWidgetServiceStackWidgetswidgetsapi6BAE39EFPOSTid9DF97A7A: | |
Type: AWS::Lambda::Permission | |
Properties: | |
Action: lambda:InvokeFunction | |
FunctionName: | |
Fn::GetAtt: | |
- WidgetsWidgetHandler1BC9DB34 | |
- Arn | |
Principal: apigateway.amazonaws.com | |
SourceArn: | |
Fn::Join: | |
- "" | |
- - "arn:" | |
- Ref: AWS::Partition | |
- ":execute-api:" | |
- Ref: AWS::Region | |
- ":" | |
- Ref: AWS::AccountId | |
- ":" | |
- Ref: Widgetswidgetsapi72353315 | |
- / | |
- Ref: WidgetswidgetsapiDeploymentStageprod0D8CD1B7 | |
- /POST/* | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/Default/{id}/POST/ApiPermission.MyWidgetServiceStackWidgetswidgetsapi6BAE39EF.POST..{id} | |
WidgetswidgetsapiidPOSTApiPermissionTestMyWidgetServiceStackWidgetswidgetsapi6BAE39EFPOSTidF1C29E62: | |
Type: AWS::Lambda::Permission | |
Properties: | |
Action: lambda:InvokeFunction | |
FunctionName: | |
Fn::GetAtt: | |
- WidgetsWidgetHandler1BC9DB34 | |
- Arn | |
Principal: apigateway.amazonaws.com | |
SourceArn: | |
Fn::Join: | |
- "" | |
- - "arn:" | |
- Ref: AWS::Partition | |
- ":execute-api:" | |
- Ref: AWS::Region | |
- ":" | |
- Ref: AWS::AccountId | |
- ":" | |
- Ref: Widgetswidgetsapi72353315 | |
- /test-invoke-stage/POST/* | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/Default/{id}/POST/ApiPermission.Test.MyWidgetServiceStackWidgetswidgetsapi6BAE39EF.POST..{id} | |
WidgetswidgetsapiidPOST60B9DB49: | |
Type: AWS::ApiGateway::Method | |
Properties: | |
HttpMethod: POST | |
ResourceId: | |
Ref: WidgetswidgetsapiidAA19CFA8 | |
RestApiId: | |
Ref: Widgetswidgetsapi72353315 | |
AuthorizationType: NONE | |
Integration: | |
IntegrationHttpMethod: POST | |
Type: AWS_PROXY | |
Uri: | |
Fn::Join: | |
- "" | |
- - "arn:" | |
- Ref: AWS::Partition | |
- ":apigateway:" | |
- Ref: AWS::Region | |
- :lambda:path/2015-03-31/functions/ | |
- Fn::GetAtt: | |
- WidgetsWidgetHandler1BC9DB34 | |
- Arn | |
- /invocations | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/Default/{id}/POST/Resource | |
WidgetswidgetsapiidGETApiPermissionMyWidgetServiceStackWidgetswidgetsapi6BAE39EFGETid8E6C9CDF: | |
Type: AWS::Lambda::Permission | |
Properties: | |
Action: lambda:InvokeFunction | |
FunctionName: | |
Fn::GetAtt: | |
- WidgetsWidgetHandler1BC9DB34 | |
- Arn | |
Principal: apigateway.amazonaws.com | |
SourceArn: | |
Fn::Join: | |
- "" | |
- - "arn:" | |
- Ref: AWS::Partition | |
- ":execute-api:" | |
- Ref: AWS::Region | |
- ":" | |
- Ref: AWS::AccountId | |
- ":" | |
- Ref: Widgetswidgetsapi72353315 | |
- / | |
- Ref: WidgetswidgetsapiDeploymentStageprod0D8CD1B7 | |
- /GET/* | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/Default/{id}/GET/ApiPermission.MyWidgetServiceStackWidgetswidgetsapi6BAE39EF.GET..{id} | |
WidgetswidgetsapiidGETApiPermissionTestMyWidgetServiceStackWidgetswidgetsapi6BAE39EFGETid5E1031AB: | |
Type: AWS::Lambda::Permission | |
Properties: | |
Action: lambda:InvokeFunction | |
FunctionName: | |
Fn::GetAtt: | |
- WidgetsWidgetHandler1BC9DB34 | |
- Arn | |
Principal: apigateway.amazonaws.com | |
SourceArn: | |
Fn::Join: | |
- "" | |
- - "arn:" | |
- Ref: AWS::Partition | |
- ":execute-api:" | |
- Ref: AWS::Region | |
- ":" | |
- Ref: AWS::AccountId | |
- ":" | |
- Ref: Widgetswidgetsapi72353315 | |
- /test-invoke-stage/GET/* | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/Default/{id}/GET/ApiPermission.Test.MyWidgetServiceStackWidgetswidgetsapi6BAE39EF.GET..{id} | |
WidgetswidgetsapiidGETABE1C648: | |
Type: AWS::ApiGateway::Method | |
Properties: | |
HttpMethod: GET | |
ResourceId: | |
Ref: WidgetswidgetsapiidAA19CFA8 | |
RestApiId: | |
Ref: Widgetswidgetsapi72353315 | |
AuthorizationType: NONE | |
Integration: | |
IntegrationHttpMethod: POST | |
Type: AWS_PROXY | |
Uri: | |
Fn::Join: | |
- "" | |
- - "arn:" | |
- Ref: AWS::Partition | |
- ":apigateway:" | |
- Ref: AWS::Region | |
- :lambda:path/2015-03-31/functions/ | |
- Fn::GetAtt: | |
- WidgetsWidgetHandler1BC9DB34 | |
- Arn | |
- /invocations | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/Default/{id}/GET/Resource | |
WidgetswidgetsapiidDELETEApiPermissionMyWidgetServiceStackWidgetswidgetsapi6BAE39EFDELETEid2BAC56B6: | |
Type: AWS::Lambda::Permission | |
Properties: | |
Action: lambda:InvokeFunction | |
FunctionName: | |
Fn::GetAtt: | |
- WidgetsWidgetHandler1BC9DB34 | |
- Arn | |
Principal: apigateway.amazonaws.com | |
SourceArn: | |
Fn::Join: | |
- "" | |
- - "arn:" | |
- Ref: AWS::Partition | |
- ":execute-api:" | |
- Ref: AWS::Region | |
- ":" | |
- Ref: AWS::AccountId | |
- ":" | |
- Ref: Widgetswidgetsapi72353315 | |
- / | |
- Ref: WidgetswidgetsapiDeploymentStageprod0D8CD1B7 | |
- /DELETE/* | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/Default/{id}/DELETE/ApiPermission.MyWidgetServiceStackWidgetswidgetsapi6BAE39EF.DELETE..{id} | |
WidgetswidgetsapiidDELETEApiPermissionTestMyWidgetServiceStackWidgetswidgetsapi6BAE39EFDELETEid4096AFEF: | |
Type: AWS::Lambda::Permission | |
Properties: | |
Action: lambda:InvokeFunction | |
FunctionName: | |
Fn::GetAtt: | |
- WidgetsWidgetHandler1BC9DB34 | |
- Arn | |
Principal: apigateway.amazonaws.com | |
SourceArn: | |
Fn::Join: | |
- "" | |
- - "arn:" | |
- Ref: AWS::Partition | |
- ":execute-api:" | |
- Ref: AWS::Region | |
- ":" | |
- Ref: AWS::AccountId | |
- ":" | |
- Ref: Widgetswidgetsapi72353315 | |
- /test-invoke-stage/DELETE/* | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/Default/{id}/DELETE/ApiPermission.Test.MyWidgetServiceStackWidgetswidgetsapi6BAE39EF.DELETE..{id} | |
WidgetswidgetsapiidDELETEE81619C6: | |
Type: AWS::ApiGateway::Method | |
Properties: | |
HttpMethod: DELETE | |
ResourceId: | |
Ref: WidgetswidgetsapiidAA19CFA8 | |
RestApiId: | |
Ref: Widgetswidgetsapi72353315 | |
AuthorizationType: NONE | |
Integration: | |
IntegrationHttpMethod: POST | |
Type: AWS_PROXY | |
Uri: | |
Fn::Join: | |
- "" | |
- - "arn:" | |
- Ref: AWS::Partition | |
- ":apigateway:" | |
- Ref: AWS::Region | |
- :lambda:path/2015-03-31/functions/ | |
- Fn::GetAtt: | |
- WidgetsWidgetHandler1BC9DB34 | |
- Arn | |
- /invocations | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/Widgets/widgets-api/Default/{id}/DELETE/Resource | |
CDKMetadata: | |
Type: AWS::CDK::Metadata | |
Properties: | |
Analytics: v2:deflate64:H4sIAAAAAAAA/02QwW6DMAyGn2X3kJZV2q6jrXabhtgTeMFjKSRBsbMKobz7SKASJ392/Nt/XMry+VUen97gToVq+8OsnEc5fzGoXlycJfZBsaiIkJdip20nLj/2M/AYOFENHgwy+pQ0SC54hYkXcatZOxtFGj7TSc7noHrMso3WcAbCKAYw3y3I+T1YlXSpbc81eqOJ8kQNRs6NG/KmHGs3aDXlvkxR0KmAZJtkdi9g1B0w3mFapEhcjXrz/MBKKRcsiyuOg5sM2mx1l6UL5JUrPL6b/IsP5F/XpseN9sd4cIxRWNeivNHhr3yR5XE5/o20LvyyWBuUzRr/Af4H+FaZAQAA | |
Metadata: | |
aws:cdk:path: MyWidgetServiceStack/CDKMetadata/Default | |
Condition: CDKMetadataAvailable | |
Outputs: | |
WidgetswidgetsapiEndpoint5B785C68: | |
Value: | |
Fn::Join: | |
- "" | |
- - https:// | |
- Ref: Widgetswidgetsapi72353315 | |
- .execute-api. | |
- Ref: AWS::Region | |
- "." | |
- Ref: AWS::URLSuffix | |
- / | |
- Ref: WidgetswidgetsapiDeploymentStageprod0D8CD1B7 | |
- / | |
Parameters: | |
AssetParameters06fc0e0c40464e675be143470bf55de82934f121e21e207249945f258a8717cfS3Bucket1DBA403C: | |
Type: String | |
Description: S3 bucket for asset "06fc0e0c40464e675be143470bf55de82934f121e21e207249945f258a8717cf" | |
AssetParameters06fc0e0c40464e675be143470bf55de82934f121e21e207249945f258a8717cfS3VersionKey975AA635: | |
Type: String | |
Description: S3 key for asset version "06fc0e0c40464e675be143470bf55de82934f121e21e207249945f258a8717cf" | |
AssetParameters06fc0e0c40464e675be143470bf55de82934f121e21e207249945f258a8717cfArtifactHashDDB17D0C: | |
Type: String | |
Description: Artifact hash for asset "06fc0e0c40464e675be143470bf55de82934f121e21e207249945f258a8717cf" | |
Conditions: | |
CDKMetadataAvailable: | |
Fn::Or: | |
- Fn::Or: | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- af-south-1 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- ap-east-1 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- ap-northeast-1 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- ap-northeast-2 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- ap-south-1 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- ap-southeast-1 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- ap-southeast-2 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- ca-central-1 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- cn-north-1 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- cn-northwest-1 | |
- Fn::Or: | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- eu-central-1 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- eu-north-1 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- eu-south-1 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- eu-west-1 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- eu-west-2 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- eu-west-3 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- me-south-1 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- sa-east-1 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- us-east-1 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- us-east-2 | |
- Fn::Or: | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- us-west-1 | |
- Fn::Equals: | |
- Ref: AWS::Region | |
- us-west-2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment