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
2
votes
0 answers

AWS MQ Trigger gets disabled automatically

I have an AWS Lambda deployed that is triggered when messages are enqueued into a RabbitMQ queue using Amazon MQ trigger. While this works in general, sometimes the MQ trigger gets disabled and needs a manual re-enabling to work properly. These are…
Prashanth
  • 1,252
  • 2
  • 13
  • 28
2
votes
0 answers

SAM CLI breaks at /var/runtime/index.js every time I invoke my function

I created the configurations to be able to invoke my lambda function directly using sam CLI. The configuration copy is shown below (using code lens). When I click F5 or press the run button to debug my function it breaks every time in a file that…
2
votes
2 answers

How do I invoke a SAM Lambda function locally with X-Ray statements?

I'm receiving the following error when invoking an AWS SAM Lambda function locally: Missing AWS Lambda trace data for X-Ray. Ensure Active Tracing is enabled and no subsegments are created outside the function handler. Below you can see my…
Sean Lindo
  • 25
  • 4
2
votes
1 answer

SAM CLI cant talk to SSL on Docker Desktop for Windows

I had installed docker-toolbox earlier, and have now installed docker for desktop with linux wsl2 containers enabled. I'm trying to test my hello world lambda function with aws-sam-cli using the following command in my project root folder: sam local…
2
votes
1 answer

ProviderARNs need to be valid Cognito Userpools

I'm trying to use a list of string inside a sam template but it doesn't work as expected. There is my code AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: > Sample SAM Template Parameters: …
filol
  • 1,669
  • 1
  • 15
  • 38
2
votes
2 answers

AWS SAM golang lambda localhost connection refused to postgres

I'm unable to connect an AWS SAM lambda function to a local postgres instance. I'll be specific in a moment, but first let me say that the same code works for my coworker and that I've tried using Postgres within a docker container as well as…
Etwillms
  • 23
  • 4
2
votes
1 answer

How to execute AWS Step Functions locally using a State Machine defined in a file?

I have followed the steps from the AWS docs in order to set up and run AWS Step Functions locally: https://docs.aws.amazon.com/step-functions/latest/dg/sfn-local-lambda.html. Everything works well, but on step #5 it says that you have to create a…
Valip
  • 4,440
  • 19
  • 79
  • 150
2
votes
0 answers

AWS SAM running local won't resolve FindInMap Intrinsic

I can't make a template.yaml with Mappings work when testing locally, although they will deploy and work as expected. As an example, one can follow: sam init --runtime python3.8 Insert Mappings such as the following in…
2
votes
0 answers

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: …
Ronaldo Lanhellas
  • 2,975
  • 5
  • 46
  • 92
2
votes
3 answers

sam local start-api go lambda returns 502 "internal server error" on linux ubuntu

While running aws sam application locally returns "Internal server error". I created aws sam hello-world example using: sam init --runtime go1.x --name robertsamlocallyhelloworld then I run app locally using: sam local start-api then: curl…
robertbeb
  • 1,520
  • 1
  • 10
  • 13
2
votes
1 answer

How to debug creating Cognito PostConfirmation trigger with SAM

I'm not able to understand why my Cognito trigger is not firing my Lambda function. Can anyone suggest either what is wrong, or point me at a way of finding why it's not working. I am able to trigger the function manually from the AWS console - I'm…
2
votes
0 answers

How to paste an image using it's url without downloading it? Python-Selenium

I am trying to write a code that periodically uploads an image(scraped as URL from somewhere else) to my twitter account. It will be in the AWS Lambda so I don't have an option(or I don't know the way yet) to download it first and then upload it to…
2
votes
1 answer

Problems testing AWS Gateway API locally

I'm trying to locally test the AWS Gateway Api locally and have been following this site (among others). I've pulled down multiple example repo's and tried to get it working and have struck out so far. For reference the most recent repo I've tried…
Mike R
  • 51
  • 5
2
votes
0 answers

How to pull lambda code & config with SAM CLI

Currently I'm working with online editor on AWS to code my lambdas.. and it's boring. That's why I want to code with my own editor (JetBrains). The problem is that I don't know how to pull code & config of my lambda (with SAM CLI not AWS CLI) in my…
2
votes
1 answer

AWS SAM template with API gateway only?

We're planning to use API Gateway as REST API HTTP proxy only initially - as we have existing REST service and we wish to split it into smaller parts under covers without changing client interface (possibly later replacing some of those parts with…
Giedrius
  • 8,430
  • 6
  • 50
  • 91