Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AWSTemplateFormatVersion: 2010-09-09
Description: "Creates infrastructure for Thumnbail Creator"
Resources:
BucketItemApiMethod:
Type: AWS::ApiGateway::Method
Properties:
RestApiId: !Ref ApiGatewayRest
ResourceId: !Ref BucketItemApiResource
HttpMethod: POST
AuthorizationType: AWS_IAM
OperationName: SaveImage
MethodResponses:
- StatusCode: 201
RequestParameters:
method.request.header.Content-Disposition: false
method.request.header.Content-Type: true
method.request.path.item: true
Integration:
Type: AWS
Credentials: !GetAtt AppRole.Arn
IntegrationHttpMethod: PUT
PassthroughBehavior: WHEN_NO_MATCH
RequestParameters:
integration.request.header.Content-Disposition: method.request.header.Content-Disposition
integration.request.header.Content-Type: method.request.header.Content-Type
integration.request.path.key: method.request.path.item
Uri:
Fn::Join:
- "/"
- - "arn:aws:apigateway:us-east-1:s3:path"
- !Ref RawBucketName
- "{key}"
IntegrationResponses:
- StatusCode: 201
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment