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
3 answers

connect to mongodb in docker from node app in AWS SAM

I am getting errors connecting to mongodb running in a docker container from my Nodejs app running in AWS SAM (used to say "in my host"). I run mongodb like: $ docker run --name mongo-myapp --rm -d -p 27018:27017 mongo and I see the results: $…
cyrf
  • 5,127
  • 6
  • 25
  • 42
0
votes
1 answer

Why doesn't AWS SAM Node.js sample application work on Arch Linux LTS?

AWS SAM sample Node.js application doesn’t work on my Arch Linux LTS environment. OS: Arch Linux 4.19.37-1-lts SAM version: 0.15.0 Docker version: 18.09.5-ce, build e8ff056dbc The error can be reproduced with following steps. Initialize a sample…
y15e
  • 159
  • 5
0
votes
0 answers

Advice on creating a SAM template for an application?

I am relatively new to infrastructure-as-code, and understand the basic ideas. I have recently been tasked with creating a SAM template for a rather large serverless application, and I just want to see if anyone has a little guidance or perhaps a…
Omar Brown
  • 31
  • 5
0
votes
2 answers

AWS SAM Lambda function to upload to S3 returns invalid response

I'm trying to write a Lambda function to upload a file to S3, using AWS SAM... I'm testing it locally but it looks like nothing is happening and the lambda function ends with invalid response. No other errors are logged. What is going on? This is…
June
  • 592
  • 8
  • 18
0
votes
2 answers

How to call Cognito User Pool for Authentication from Javascript page for Lambda API gateway

I am having Amazon Connect Customized Control Panel where Agent can receive call. I have developed customized HTML screen where agent can enter customer details and save into database. For saving I am calling lambda function using API gateway. I am…
0
votes
1 answer

SAM template "Invalid template property or properties [MyApi]"

I am getting the following error after running CLI command aws cloudformation deploy (after sam package) "Failed to create the changeset: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state Status: FAILED. Reason:…
jhurtas
  • 555
  • 1
  • 6
  • 17
0
votes
1 answer

how to add plugin in aws-sam template.yaml file

is there any way to add custom plugin in aws-sam template.yaml file like Serverless.yml file for eg: plugins: - plugin-1 - plugin-2 custom: abc: accountId: "************"
0
votes
1 answer

Internal transform error in cloudformation stack

I get an "Internal transform" error when deploying this template. I use a Mapping to transform dev and prod settings. This works for single values but cloudformation is choking on trying to transform the Events config. This passes aws cloudformation…
red888
  • 27,709
  • 55
  • 204
  • 392
0
votes
1 answer

How do I do "/" for an API event in my template?

This is my lambda resource: Resources: myFunction: Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction …
red888
  • 27,709
  • 55
  • 204
  • 392
0
votes
0 answers

aws cloudformation with sam use of intrinsic functions

How come the intrinsic cloudformation function !ImportValue does not resolve to a string when I place it in a Join function within the definitionbody of my serverless api template? This cloudformation template: UserAPI: Type:…
Ludo
  • 2,307
  • 2
  • 27
  • 58
0
votes
1 answer

Is there a good skeleton for setting up an AWS SAM project the will consist of multiple lambda functions?

is there a source code for setting up a SAM project with the aim of adding multiple lambda functions (with shared code on some)? It's also important that I could use the sam local feature for starting the api locally. I checked the official AWS…
Nadav96
  • 1,274
  • 1
  • 17
  • 30
0
votes
2 answers

"sam local start-api" fails with "invalid volume specification" on (Windows 10 Pro, Docker for Windows)

I am using SAM CLI 0.6.0 and I am getting the error below when running sam local start-api with the app generated using sam init --runtime java PS C:\Users\Kiran\AWS\SAM\java-sample\sam-app> sam local start-api 2018-09-03 10:49:49 Mounting…
Kiran P
  • 9
  • 2
0
votes
1 answer

Getting error while developing AWS serverless Express application using sam cli

Whenever I hit my local url of project as http://127.0.0.1:3000/ get method I get error as follows: 2018/08/07 15:19:41 Invoking index.handler (nodejs4.3) 2018/08/07 15:19:42 Mounting /e/serverless/sanlamFundRisk as /var/task:ro inside runtime…
0
votes
1 answer

Access SSM parameters from parameter store

I have SAM template which deploys few lambdas and I would like to use some parameters I created in SSM parameters store. I created 2 parameters for my tests: /test/param which is a simple string /test/param/encrypt which contains the same string as…
0
votes
1 answer

Unable to debug aws-sam project using aws eclipse toolkit

I am trying to debug aws-sam application using the steps here. However, I am not able to get eclipse toolkit to enter debug mode. The first steps in running in debug mode appear to work i.e. the project builds and runs tests successfully as can be…
Syed Ali
  • 1,817
  • 2
  • 23
  • 44