How can I SAM deploy an AWS::S3::Bucket with initial files from the project directory
Asked Answered
B

0

6

I have a simple SAM template in which I am creating an AWS::S3::Bucket:

AWSTemplateFormatVersion: 2010-09-09
Transform: AWS::Serverless-2016-10-31
Resources:
  Bucket:
    Type: AWS::S3::Bucket

Now in my project directory I have a folder called ./assets/ which contains a bunch of files that I want to be housed in the bucket. My idea is that there is some function like:

AWSTemplateFormatVersion: 2010-09-09
Transform: AWS::Serverless-2016-10-31
Resources:
  Bucket:
    Type: AWS::S3::Bucket
    Properties:
      ContentUri: ./assets/

that would allow me to include the files I want uploaded to S3 initial in the build so that they are in the bucket after the deploy, but I can't seem to find any way to do this.

So my question is how can I make the folders content be uploaded to the bucket during the SAM deploy?

Bradytelic answered 9/6, 2021 at 12:23 Comment(1)
you use the aws cli for thisShoreward

© 2022 - 2024 — McMap. All rights reserved.