Git Product home page Git Product logo

Comments (3)

jkruse14 avatar jkruse14 commented on July 18, 2024

I found the docs for building a custom runtime. It has the following:

Entrypoint

A custom runtime's entry point is an executable file named bootstrap. The bootstrap file can be the runtime, or it can invoke another file that creates the runtime. If the root of your deployment package doesn't contain a file named bootstrap, Lambda looks for the file in the function's layers. If the bootstrap file doesn't exist or isn't executable, your function returns a Runtime.InvalidEntrypoint error upon invocation.

This suggests my issue is the bootstrap file cannot be found or is not executable.

I'm wondering if add chmod 755 is needed in the Make file?

It feels like there is something missing in the SAM CLI steps, but I'm not familiar with custom runtimes.

from cloudformation-guard.

jkruse14 avatar jkruse14 commented on July 18, 2024

I downloaded the archive sent to CloudFormation

guard-lambda/.aws_sam/:

build toml:

# This file is auto generated by SAM CLI build command

[function_build_definitions.0d073aed-090f-4c83-84e2-c81a4f2c1d63]
codeuri = "/home/runner/work/db-aws-cloudformation-guard/db-aws-cloudformation-guard/cloudformation-guard"
runtime = "provided.al2"
architecture = "x86_64"
handler = "guard.handler"
manifest_hash = ""
packagetype = "Zip"
functions = ["CloudFormationGuardLambda"]

[function_build_definitions.0d073aed-090f-4c83-84e2-c81a4f2c1d63.metadata]
BuildMethod = "makefile"

[layer_build_definitions]

build/template.yaml - my template posted above

build/CloudFormationGuardLambda/: bootstrap archive file

Within the archive is see:
image

I'm guessing this issue is I should not have the entire repo packaged and uploaded to S3 and only the .aws_sam directory?

from cloudformation-guard.

jkruse14 avatar jkruse14 commented on July 18, 2024

I found my issue - it was two fold.

First, I was not familiar with sam build vs. sam package as I've only really had need for sam package. After digging deeper on this, I found build creates the .aws_sam directory and deploy will upload this ✔️

Second, I was using a samconfig.toml file which specified the template. This needed to be removed because it was overriding the template in .aws_config ✔️

With these issues fixed, I have a working lambda function running cfn-guard! 🎉

from cloudformation-guard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.