-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Lambda functions containers initialization failed because of Resource ID was not provided #6194
Comments
Thanks @boozedog for raising this issue. Could you please share your template with us so we can investigate your problem. |
sure it is from the helloworld sample AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
lambda-sam
Sample SAM Template for lambda-sam
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 3
Resources:
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
PackageType: Image
Architectures:
- x86_64
Events:
HelloWorld:
Type: Api
Properties:
Path: /hello
Method: get
Metadata:
DockerTag: nodejs18.x-v1
DockerContext: ./hello-world
Dockerfile: Dockerfile
Outputs:
# ServerlessRestApi is an implicit API created out of Events key under Serverless::Function
# Find out more about other implicit resources you can reference within SAM
# https://github.com/awslabs/serverless-application-model/blob/master/docs/internals/generated_resources.rst#api
HelloWorldApi:
Description: "API Gateway endpoint URL for Prod stage for Hello World function"
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/"
HelloWorldFunction:
Description: "Hello World Lambda Function ARN"
Value: !GetAtt HelloWorldFunction.Arn
HelloWorldFunctionIamRole:
Description: "Implicit IAM Role created for Hello World function"
Value: !GetAtt HelloWorldFunctionRole.Arn |
@moelasmar i should also point out that |
@moelasmar any thoughts? |
Hi @boozedog , As far as I understand, you want to run However the template you have above is a IMAGE type lambda function, which needs to be build before running it (we need the local docker image to invoke). For that reason, this won't work. You can either switch using a ZIP lambda function, or you can test in the cloud with |
Closing this issue since it's been inactive for a while. Feel free to try out @mndeveci's suggestions and open a new issue if you still have questions/concerns. |
|
@mndeveci Your explanation of this issue makes sense. After doing a
At the very minimum the output message should reflect reality, which is one does need to need to rebuild/restart/reload when using container images. |
Description:
Steps to reproduce:
Observed result:
Expected result:
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
:SAM CLI, version 1.100.0
Add --debug flag to command you are running
The text was updated successfully, but these errors were encountered: