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

Invalid service prefix for action 'sts.AssumeRole'

I have a simple AWS::IAM::Role defined in my CloudFormation template. Its role is to allow APIGateway to call my lambda functions. However, during my sam deploy I get the following: CREATE_FAILED AWS::IAM::Role …
0
votes
0 answers

Facing challenge in testing lambda locally inside docker

I am working inside Docker. I have started the docker-container using below command (from base image of Linux Ubuntu) and have installed all necessary softwares inside the Container like "sudo", "JDK", "maven", "vim", "aws-cli", "sam-cli",…
Aditya Goel
  • 201
  • 1
  • 15
0
votes
1 answer

How do I run Docker inside a Docker Container?

I am learning AWS Lambda. Unfortunately, I can't install SAM-TOOLKIT (sam-cli) on my host computer MAC, but I have Docker installed. Now, I work inside Docker flawlessly. I have started the docker-container (from base image of Linux Ubuntu) and have…
0
votes
2 answers

How to develop lambda functions that depend on AWS triggers?

Lambda functions often get triggered by several AWS events (e.g an EventBridge event). I am developing a python lambda that once triggered by an EventBridge event (that matches a pattern for Security Hub), creates tickets on Jira. My question is:…
Dimi
  • 309
  • 5
  • 25
0
votes
1 answer

How do we format the logs in the SAM CLI log command to just show the message?

The SAM CLI function to tail the logs is AWESOME. However, I find the formatting to be too verbose most of the time. The default formatting looks like this: 2021/12/13/[$LATEST]c87a125640ed4c66907f22c1d83ca63e 2021-12-13T13:11:09.388000…
Brian
  • 1,675
  • 3
  • 19
  • 29
0
votes
2 answers

How to use AWS CLI to create a stack from scratch?

The problem I'm approaching AWS, and the first test project will be a website, but i'm struggling on how to approach the resource and the tools to accomplish this. AWS documentation is not really beginner-friendly, so to me it is like to being…
fudo
  • 2,254
  • 4
  • 22
  • 44
0
votes
1 answer

Set HTTP 1.1 for sam local start-api

I'm developing a lambda function and using AWS SAM to build my stack. I've noticed that when I test locally using sam local start-api, the API responds with HTTP 1.0 for HTTP 1.1 requests. Here's a sample output from curl: * Trying…
0
votes
0 answers

Snowflake Connector for Python

I am trying to use the snowflake connector for python in a lambda function. I am using a virtual environment and I am getting this error. Running PythonPipBuilder:ResolveDependencies Build Failed Error: PythonPipBuilder:ResolveDependencies -…
0
votes
0 answers

Boto3 fails to find resources when using lambda python runtime in containerized lambda function

When I try to access resources from AWS via boto3 (for example secrets from the secrets manager) I get an error when I use the python lambda runtime (public.ecr.aws/lambda/python3.8). I use the SAM CLI to deploy my function. This is my template…
rvwsd
  • 97
  • 11
0
votes
1 answer

How can I run AWS Lambda locally and access DynamoDB?

I try to run and test an AWS Lambda service written in Golang locally using SAM CLI. I have two problems: The Lambda does not work locally if I use .zip files. When I deploy the code to AWS, it works without an issue, but if I try to run locally…
Moha
  • 857
  • 2
  • 12
  • 25
0
votes
1 answer

AccessDenied when deleting s3 bucket in CFN resource provider test

I'm creating a cloudformation resource using the cloudformation cli tool. However I'm having trouble with my DELETE action. In my create action I am creating a bucket: s3 = session.client("s3",…
0
votes
1 answer

Serverless Flask API crashes when trying to consume multipart/form-data

I have a serverless api through sam that consists of aws::serverless:function's and using flask-lambda to consume requests. I have been able to consume normal rest requests but I have a use-case to take in 3 property values and multiple files so…
0
votes
1 answer

AWS SAM local invoke doesn't work when python venv has dependencies

I am trying to run a very simple python lambda function locally to learn how AWS SAM local invoke works and test my code. I have a very simple file structure that more or less looks like this: |- env/ |- lambda_function.py |- pyproject.toml |-…
Adnan Siddiquei
  • 433
  • 1
  • 5
  • 11
0
votes
1 answer

SAM CLI - Why does it take weeks for new versions of well-known libraries to be available?

It happened to us many times, we try to use a newly issued version of a certain well-known library in Python (the new version is available on Conda and PIP), but we try to use it via AWS SAM CLI, the build fails saying something like this: Error:…
Saw
  • 6,199
  • 11
  • 53
  • 104
0
votes
1 answer

AWS sam deploy failed : Waiter ChangeSetCreateComplete failed: Max attempts exceeded

Just added a DynamoDB table to my template.yaml for my stack. Running aws deploy freezes for some time with message Waiting for changeset to be created.. And after a few minutes fails with File…