Closed
Description
Is it possible to create a lambda function using SAM template? For example:
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
TestLambda:
Type: 'AWS::Serverless::Function'
Properties:
CodeUri: ./testLambda.zip
Handler: testLambda.handler
.......
When I try to package to s3 in localstack using the following command:
aws --endpoint-url=http://localhost:4581 cloudformation package --template-file test.yaml --output-template-file output.yaml --s3-bucket test-bucket
I get an error as follows:
Unable to upload artifact ./testLambda.zip referenced by CodeUri parameter of TestLambda resource. An error occurred (AccessDenied) when calling the PutObject operation: Access Denied.
Any help will be appreciated.