Coder Social home page Coder Social logo

How can I deploy greengrass lambda and group with another user ID/group ID lambda runtime environment ? about aws-greengrass-provisioner HOT 4 CLOSED

kimsehwan96 avatar kimsehwan96 commented on June 23, 2024
How can I deploy greengrass lambda and group with another user ID/group ID lambda runtime environment ?

from aws-greengrass-provisioner.

Comments (4)

timmattison avatar timmattison commented on June 23, 2024

deployment.default.conf's uid/gid should do it but I'll test it out right now.

from aws-greengrass-provisioner.

timmattison avatar timmattison commented on June 23, 2024

Oops, I meant function.default.conf. The top level uid and gid values are what you are looking for I believe.

I updated the bare function.default.conf to look like this:

conf {
  encodingType = Json
  connectedShadows = []
  localDeviceResources = []
  localVolumeResources = []
  localS3Resources = []
  localSageMakerResources = []
  localSecretsManagerResources = []
  accessSysFs = false
  memorySizeInKb = 32768
  greengrassContainer = true
  environmentVariables = {
    GROUP_ID = ${GROUP_ID}
    AWS_IOT_THING_NAME = ${AWS_IOT_THING_NAME}
    AWS_IOT_THING_ARN = ${AWS_IOT_THING_ARN}
    AWS_GREENGRASS_GROUP_NAME = ${AWS_GREENGRASS_GROUP_NAME}
  }
  uid = 1000
  gid = 1000
  javaJsonHandler = "handleJsonRequest"
  javaBinaryHandler = "handleBinaryRequest"
}

And the corresponding Hello World function looked like this in my process list:

ubuntu   13900  0.3  1.9 215036 18672 ?        Ssl  17:15   0:00 python3.7 -u /runtime/python/lambda_runtime.py --handler=HelloWorldPython3.function_handler

In this case user ubuntu is uid/gid 1000.

Going back to the default file makes this process run as ggc_user which is uid 111 on my system.

ggc_user 13938  0.8  1.9 215036 18640 ?        Ssl  17:18   0:00 python3.7 -u /runtime/python/lambda_runtime.py --handler=HelloWorldPython3.function_handler

from aws-greengrass-provisioner.

timmattison avatar timmattison commented on June 23, 2024

@kimsehwan96 is that what you're looking for?

from aws-greengrass-provisioner.

timmattison avatar timmattison commented on June 23, 2024

Closing for now but please re-open the ticket if this isn't what you needed. Thanks!

from aws-greengrass-provisioner.

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.