Coder Social home page Coder Social logo

Comments (6)

GavinZZ avatar GavinZZ commented on September 26, 2024

SAM Transform will ignore non-SAM resource during transform step and return the CFN resource as is. So this is not a SAM Transform issue and likely a SAM CLI issue. Going to transfer to the CLI repository.

from aws-sam-cli.

hnnasit avatar hnnasit commented on September 26, 2024

Hi @Luna-LHY, thanks for reporting the issue. I tried to deploy the following resource and it deployed successfully:

MyBucket:
    Type: AWS::S3Express::DirectoryBucket
    Properties:
      BucketName: example-bucket--use1-az6--x-s3
      DataRedundancy: SingleAvailabilityZone
      LocationName: use1-az6

Could you check here if you are following the the correct guidelines for naming the bucket for AWS::S3Express::DirectoryBucket resource type? SAM CLI calls CloudFormation boto3 API's in the background to create the stack, so there is nothing different SAM CLI does for non-SAM resources.

from aws-sam-cli.

Luna-LHY avatar Luna-LHY commented on September 26, 2024

Ah thanks for pointing out. I didn't realize we should input the full bucket name there. In S3 console, we only need to input the "Base name", and then it will automatically generate the full bucket name with Availability Zone suffix. So I thought that for cfn template it should be the same....

from aws-sam-cli.

Luna-LHY avatar Luna-LHY commented on September 26, 2024

I'm still getting the same error after fixing S3 bucket naming pattern. I checked my template and I think the error is probably from Lambda event source. It looks like for S3 event, only AWS::S3::Bucket data type works :(

      Events:
        S3NewObjectEvent:
          Type: S3
          Properties:
            Bucket: !Ref MyExpressOneZoneBucket
            Events: s3:ObjectCreated:*
            Filter:
              S3Key:
                Rules:
                  - Name: suffix
                    Value: ".mp4"
                  - Name: prefix
                    Value: "input/"

Well, Amazon Q told me Lambda supports S3 Express One Zone bucket type as Lambda event, but I didn't find any doc about this.

from aws-sam-cli.

hawflau avatar hawflau commented on September 26, 2024

Hey @Luna-LHY I confirmed from Lambda Console that I couldn't add a DIrectory Bucket as a Lambda Event. So I guess it's not supported.

Closing the issue. Please re-open or create a new issue if you still have questions

from aws-sam-cli.

github-actions avatar github-actions commented on September 26, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

from aws-sam-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.