Skip to content

Appsync resolver to have access to ENV variable #408

@mattiLeBlanc

Description

@mattiLeBlanc

Is your feature request related to a problem? Please describe.
When creating a BatchPutItem template, I have to provide the table name for the batch operation.
Since I create my table via Cloudformation and with an ENV value attached, I cannot use the BatchPutItem since I don't have access to the current Environment value in the resolver template.

A workaround I am using right now is the first call a Lambda in a pipeline resolver and passing on the Environment value from the first function to the second that does the batchPutItem.
However, this is kinda unnecessary and requires an extra lambda call while the ENV value should be available during runtime. It looks like it is just not exposed via $ctx.

Describe the solution you'd like
Expose the environment value in the $ctx object.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions