question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pipeline config not showing up on synth output

See original GitHub issue

Screen Shot 2020-03-21 at 3 54 21 PM

Reproduction Steps

const lambdaWithStash = `
#set($ctx.stash.newId = $util.autoId())
{"version": "2017-02-28", "operation": "Invoke", "payload": $util.toJson($ctx)}
`
const passThrough = `$util.toJson($ctx.result)`

export const resolverDefaults = {
  requestMappingTemplate: Appsync.MappingTemplate.fromString(lambdaWithStash),
  responseMappingTemplate: Appsync.MappingTemplate.fromString(passThrough),
}

// this == CDK.Stack
new Appsync.Resolver(this, 'pipeline', {
      ...resolverDefaults,
      api: Graphql, // Appsync.GraphQLApi
      typeName: 'Conversation',
      fieldName: 'messages',
      pipelineConfig: {
        functions: ['lambda1', 'lambda2'] // valid lambdas on my Lambda console
      }
    })

Error Log

see screnshot

Environment

  • CLI Version : 1.27.0 (build a98c0b3)
  • Framework Version: not sure what this means.
  • OS : macos 10.14.6
  • Language : typescript

Other

I’m passing a valid, as per cdk types, pipelineConfig but it shows as undefined in my cdk synth output, causing deploy to fail even though my cdk code looks correct


This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
BryanPan342commented, Jul 16, 2020

Okay I think I found the root of the confusion.

The Function that can be added to the pipelineConfig is not a Lambda Function. Instead, it is AppSync::Function.

See documentation on pipelineConfig here.

See documentation on functionConfiguration here.

See documentation on appsync:CreateFunction here.

If you want to use Lambda Functions, I suggest using the addLambdaDataSource and createResolver method outlined above.

That being said, CDK doesn’t have implementation for AppSync Function so I will close this issue and opening #9092 for a feature request for AppSync function creation.

1reaction
vengad-techcommented, Jul 3, 2020

Any update on the same ? seems like a bad bug, would be great if you guys can fix it. I am currently blocked on the same

Read more comments on GitHub >

github_iconTop Results From Across the Web

CDK Pipelines - AWS Documentation - Amazon.com
It means that the AWS CodeBuild project for 'Synth' is not configured to run in privileged mode, which prevents Docker builds from happening....
Read more >
CDK Pipelines: Beyond the Basics - AWS in Plain English
Deploying the API consists of two actions: running cdk synth to generate CloudFormation template and other assets required for deployment (e.g. lambda source ......
Read more >
AWS CDK synth errors out for a Code Pipeline with ...
Here is my code which does not have any errors but errors out while doing a cdk synth. const pipeline = new CodePipeline(this,...
Read more >
AWS CDK Pipelines: Real-World Tips and Tricks (Part 2)
json is used for local development and for predefined pipeline actions such SimpleSynthAction.standard_npm_synth() . If no standard standard synth action is ...
Read more >
Pipeline XT: Integrating Outboard In Studio One
Pipeline XT isn't useful only with traditional hardware outboard: modular synths can also be brought into play for sound shaping. Having achieved great...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found