Questions tagged [aws-sam-cli]

AWS SAM Local allows developers to run & debug AWS Lambda code on local machine using Docker. AWS Lamda is a part of Amazon Web Services (AWS).

AWS SAM Local allows developers to run & debug AWS Lambda code on local machine using Docker. AWS Lamda is a part of Amazon Web Services (AWS).

Resources

512 questions
0
votes
0 answers

Using a portable Makefile for AWS Lambda

I'm using a Makefile for building a lambda extension. It works fine when I run a sam build command from Azure DevOps using Ubuntu. However, sometimes I want to build from my PC and the Makefile doesn't work because commands are different. I suppose…
Colin
  • 331
  • 3
  • 19
0
votes
1 answer

How to reference the --s3-bucket value in my Outputs?

I do a SAM deployment from my local console. With sam package ... --s3-bucket xy I specify the existing s3-bucket where deployment relevant objects are stored. I want that bucket to appear in the Output section in Cloudformation but I don't know how…
peer
  • 4,171
  • 8
  • 42
  • 73
0
votes
0 answers

AWS SAM Deployment

When using sam build && sam deploy --guided --capabilities CAPABILITY_IAM to deploy my image compression lambda I receive the following…
Markus G.
  • 1,620
  • 2
  • 25
  • 49
0
votes
0 answers

AWS SAM deploy failing

I have taken over some code where I don't have any context to how it was built initially, my only task is to "deploy to AWS". It is a SAM application using cloudformation, lambda, s3, cognito, and dynamoDb. I have installed aws-cli and aws-sam-cli…
user1779418
  • 455
  • 1
  • 7
  • 22
0
votes
1 answer

Override Spring profile sam local start-lambda

I am using SAM to test my Lambda locally. The Lambda has two spring profiles, one for local testing and one for production. Currently, my Lambda is unable to pick up the test yml file. sam-beta-cdk local start-lambda --env-vars env.json …
Ben
  • 239
  • 1
  • 11
0
votes
1 answer

Cannot find module `@ericblade/quagga2`

I'm having an issue with my typescript serverless CDK lambda dependencies. Simply running npm install and routing to the file where I'm importing the @ericblade/quagga2 module, I can command click and route to the module. However, when running the…
cWerning
  • 583
  • 1
  • 5
  • 15
0
votes
0 answers

single Template.yml mutiple lambda functions and code-build to deploy other accounts

We have the pipeline code. where it does code-commit. code-build and create and deploy changeset where it deploys to other AWS accounts. this codebase has a lambda function in the template.yaml along with java codebase. during the build phase, it…
0
votes
2 answers

Create IAM role from template in SAM

I am trying to add an IAM role to an already existing template that allows certain access to a bucket from an external source (snowflake) RoleNameForAccess: Type: AWS::IAM::Role Properties: RoleName: RoleNameForAccess …
Mario Garcia
  • 177
  • 1
  • 4
  • 15
0
votes
0 answers

AWS SAM local API debugging : How to test the access with an API key?

I am currently learning AWS Serverless Application Model (SAM). With that objective, I created a simple template that is deploying a Python Lambda function and an API which calls this function. My template is the following…
FenryrMKIII
  • 1,068
  • 1
  • 13
  • 30
0
votes
1 answer

AWS SAM Schedule Lambda is not triggering as per Schedule

I have a use case where I need to call one API every 2 minutes to check the updates and store the result into the database. For the same, I am trying the AWS Schedule lambda function using AWS SAM CLI using Python but my Lambda function is not…
Mihir Shah
  • 948
  • 10
  • 17
0
votes
1 answer

sam local invoke from pure stdin

with --help i can see Invoking a Lambda function using input from stdin $ echo '{"message": "Hey, are you there?" }' | sam local invoke "HelloWorldFunction" --event - And it works as such. But trying to make use of stdin without piping an…
malarres
  • 2,941
  • 1
  • 21
  • 35
0
votes
1 answer

Import secret manager passphrase to intrinsic function Fn::Sub:

At part of my template.yaml, I have a config resource that complies to config.json at run time. I'm trying to import from my string a value from my secret manager. As far as I know, importing values from the secret manager looks like…
MCMatan
  • 8,623
  • 6
  • 46
  • 85
0
votes
0 answers

How to use multiline parameters in AWS SAM State Machine definition?

I have a very long but repetitive State Machine definition in json format and I am trying to extract some of the common blocks into the AWS SAM template using the DefinitionSubstitutions property of the State Machine block. For example, I have a…
0
votes
1 answer

Cannot get AWS SAM CLI to work with Python 3.5.x

I am certain that this issue is down to my own ignorance of Python and pip, however, I have scoured the net and tried many things to get this to work, so far, to no avail. I have a docker image based on the Bitbucket pipelines default image (version…
user3067870
  • 556
  • 1
  • 6
  • 17
0
votes
1 answer

AWS SAM problem with deploy Severless Api with auth

I think i do something wrong in my .yaml file. Probably its problem with AWS::Serverless::Api. Before i add it everything was fine. I just want to configure api with authorization. I also want to know how to configure which request will be…