I'm trying to configure this website routing rule for my static s3 bucket website using serverless yaml which uses cloudformation.
<RoutingRules>
<RoutingRule>
<Condition>
<KeyPrefixEquals/>
<HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals>
</Condition>
<Redirect>
<Protocol>https</Protocol>
<HostName>foo.amazonaws.com</HostName>
<ReplaceKeyPrefixWith>prod/photos/resize?key=</ReplaceKeyPrefixWith>
<HttpRedirectCode>307</HttpRedirectCode>
</Redirect>
</RoutingRule>
</RoutingRules>
How do I translate that to my yaml below?
resources:
Resources:
UploadBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: ${file(./serverless.env.yml):${opt:stage}.BucketName}
AccessControl: PublicRead
WebsiteConfiguration:
IndexDocument: index.html
RoutingRule: //What's the format that goes here?