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
1 answer

aws lambda get-account-settings returns 'str' object has no attribute 'get'

sam --version SAM CLI, version 1.0.0 aws --version aws-cli/1.18.79 Python/3.7.6 Darwin/19.6.0 botocore/1.17.7 The issue: $ aws lambda get-account-settings 'str' object has no attribute 'get' In ~/.aws/config shown below in its…
fika_fika
  • 111
  • 1
  • 10
0
votes
1 answer

AWS SAM/AWS Toolkit Docker Mounting Error

What path do I add to docker to enable AWS SAM to locally debug? Adding the path to the directory in which I work normally does not work.
Gunty
  • 1,841
  • 1
  • 15
  • 27
0
votes
1 answer

How to link a docker container with a node.js server

The command sam local start-lambda spins up a server inside a Docker container that emulates an AWS Lambda function: $ sam local start-lambda Starting the Local Lambda Service. You can now invoke your Lambda Functions defined in your template…
Maria Ines Parnisari
  • 16,584
  • 9
  • 85
  • 130
0
votes
1 answer

Refering to an externally defined API for a Function event in SAM

In my SAM templates, my team has defined an API that is mostly to our liking. I would like to debug this API locally, but it isn't set explicitly as an Event under our Function. So sam local start-api fails with the error Error: Template does not…
Vincent Buscarello
  • 395
  • 2
  • 7
  • 19
0
votes
1 answer

What IP for localhost when doing an axios.request if invoking on function with sam local invoke?

I am using aws sam cli and I do sam local invoke functionName. Everything works just fine, but at some point I want to do a request using Axios to my local API running on a django server. The problem is I don't know which IP to do my GET request. I…
DarK_FirefoX
  • 887
  • 8
  • 20
0
votes
0 answers

Deploying AWS SAM application does not deploy depedencies for Lambda

I have two SAM applications, both of which have a set of Python Lambdas in common. I have a different template file for each application. When I run sam deploy for the first one it correctly deploys the Lambdas with their dependencies. For the…
Nick Lothian
  • 1,427
  • 1
  • 15
  • 31
0
votes
1 answer

aws sam cli-colored output in jenkins console

From version 0.33.1 onwards, aws-sam-cli supports colored output. I'm trying to run the sam deploy command from Jenkins pipeline and the output is not displaying in colored format. I've installed ANSIColor Jenkins plugin and wrapped the sam deploy…
Haran
  • 1,040
  • 2
  • 13
  • 26
0
votes
1 answer

AWS Lambda / SAM: How to get invocation URI from CLI?

As part of a AWS SAM template, I have a function with an HttpPost event trigger. Because I'm using the AWS SAM transform, I am not explicitly declaring the API Gateway that gets created to route this http post to trigger the function. Given that, is…
Andrew Schwartz
  • 4,440
  • 3
  • 25
  • 58
0
votes
1 answer

How to ignore redundant files while deploying lambda in SAM project

I have SAM project structure like this: sam-app/ ├── README.md ├── events/ │ └── event.json ├── myTestLambda/ │ ├── app.py │ └── requirements.txt ├── template.yaml └── tests/ └── unit/ …
0
votes
1 answer

Unable to import python package in AWS SAM local development

I am using AWS sam cli to develop python application locally first. I have used sam build command to install python packages mentioned in requirements.txt. Build folder is created with the dependency package folders, But in the code, the import…
user9040429
  • 690
  • 1
  • 8
  • 29
0
votes
0 answers

request and axios does not work with sam for debugging lambda function

I tried to write lambdaa function with node.js and run it on my local with sam-cli but inside that lambda function I have to send some log to the log server with post request but for sending request I tried to use request and axios but none of them…
0
votes
2 answers

AWS SAM local debugging is chargeable?

I am using Visual Studio code for debugging a lamda function written in python. Is the local execution of the lamda function is chargeable ? since at the end of each execution we are getting an entry in the log showing execution time…
nightfly
  • 425
  • 2
  • 8
  • 18
0
votes
0 answers

jdk not found aws sam application visual studio code

I want to debug a java8 (aws) project with visual studio code, so I created with vscode a new sam application runtimes. In the list of runtimes, I can't found java8 despite it is installed and specified in settings.json "java.home": "C:\Program…
0
votes
1 answer

How to "sam package" using AES256 encryption?

From here I see the syntax: sam package \ --template-file /path_to_template/template.yaml \ --s3-bucket bucket-name \ --s3-prefix appname/branchname/version --output-template-file packaged-template.yaml or aws cloudformation…
overexchange
  • 15,768
  • 30
  • 152
  • 347
0
votes
0 answers

Workaround for AWS SAM with a provided lambda runtime

I would like to stage a larger project with AWS SAM. Sadly a part of this project consists of a lambda function with a custom runtime and SAM does not include a way to set this up. Does anyone know a workaround for this? If there is no other way I…
Junge
  • 437
  • 6
  • 14