aws/aws-sam-cli

podman + sam locally stuck on "Testing application behaviour against authorizers..." step

Closed this issue · 2 comments

Hello,

I have been trying to set up podman and sam to run a serverless app backend locally. When I use docker it works normally and my lambda functions mount, however when running podman sam gets stuck on this "Testing application behaviour..."step without proceeding to mount my functions. The same issue was observed by other members of our team.

My device: Apple M1 Pro
sam version: SAM CLI, version 1.132.0
podman: podman version 5.3.1
Docker cli: Docker version 27.3.1, build ce1223035a
Docker-compose: Docker Compose version 2.31.0

For context,
My aws config is set up correctly.
Podman is running and my containers are mapping to the right ports, I am able to ping them with curl.
I have also tried setting my DOCKER_HOST path as here

docker context create podman --docker "host=unix://$HOME.local/share/containers/podman/machine/podman.sock"

and then running my api after sam build has been successful:

SAM_CLI_CONTAINER_RUNTIME=podman sam local start-api --env-vars .env.json --parameter-overrides EnvironmentClientIdKey=local

However, sam remains hanging indefinitely not mounting functions

sam local start-api --env-vars .env.json --parameter-overrides EnvironmentClientIdKey=local 
No current session found, using default AWS::AccountId                                                 
                                                                                                       
AWS SAM CLI does not guarantee 100% fidelity between authorizers locally                               
and authorizers deployed on AWS. Any application critical behavior should                              
be validated thoroughly before deploying to production.                                                
                                                                                                       
Testing application behaviour against authorizers deployed on AWS can be done using the sam sync       
command.                                                                                               
                                                                                                       

Running simply sam local start-api or sam local start-api --env-vars .env.json --parameter-overrides EnvironmentClientIdKey=local also gets stuck without mounting lambda functions. 😢

I found my issue is a duplicate of #7298 with solution here The only difference is that I confirm my issue affects Mac OS whereas the #7298 originally reported relates to Fedora OS users

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.