Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
420 views
in Technique[技术] by (71.8m points)

amazon web services - AWS SAM Package don't send to S3 Bucket

I'm trying to send a simple hello world using net core 3.1 lambda with AWS SAM, so this is my template.yml:

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Net Core 3.1 Lambda
Resources:
  netcore31lambdafunc:
    Type: AWS::Serveless::Function
    Properties:
      FunctionName: Netcore31Test
      CodeUri: src/LambdaEmptyServerless/bin/Release/netcoreapp3.1/publish
      Handler: LambdaEmptyServerless::LambdaEmptyServerless.Functions::Get
      Runtime: dotnetcore3.1
      Events:
        netcore31ApiEvent:
          Type: Api
          Properties:
            Path: /
            Method: GET

That is located in this level:

enter image description here

Now I'm trying to package this to S3 bucket, so I'm executing the following:

sam package --template-file template.yml --output-template-file out-template.yml  --s3-bucket demo-sam-001

I got the following return:

Successfully packaged artifacts and wrote output template to file out-template.yml.
Execute the following command to deploy the packaged template
sam deploy --template-file C:Users
lanhWorkspacePessoalawssam-netcore31LambdaEmptyServerlessout-template.yml --stack-name <YOUR STACK NAME>

But nothing is uploaded to my S3 bucket.

question from:https://stackoverflow.com/questions/65902895/aws-sam-package-dont-send-to-s3-bucket

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...