Skip to content
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

update example to include AWS-CDK usage #19

Open
nexus-uw opened this issue Jan 5, 2020 · 1 comment
Open

update example to include AWS-CDK usage #19

nexus-uw opened this issue Jan 5, 2020 · 1 comment

Comments

@nexus-uw
Copy link

nexus-uw commented Jan 5, 2020

hi,

Im not sure where this could go within the existing documentation, so I thought I could just quickly dump it into an issue (feel free to close it)

I had some trouble getting imagemagick-aws-lambda-2
to work with AWS-CDK the other night, so I thought I would share how I got it to work

const imageMagick = new CfnApplication(scope, 'imageMagick', {
      location: {
        applicationId: 'arn:aws:serverlessrepo:us-east-1:145266761615:applications/image-magick-lambda-layer',
        semanticVersion: '1.0.0'
      }
    })

    const lambdaFn = new lambda.Function(this, 'myLambda', {
  ...
      layers: [
        lambda.LayerVersion.fromLayerVersionArn(this, 'imageLayer', imageMagick.getAtt('Outputs.LayerVersion').toString())
      ]
    })
@aeksco
Copy link

aeksco commented Feb 27, 2020

👍 definitely worth adding this to the README.md - thanks for sharing @nexus-uw!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants