aws-samples / image-optimization

Simple, performant and cost efficient solution for optimizing images using Amazon CloudFront, Amazon S3 and AWS Lambda
MIT No Attribution
172 stars 106 forks source link

Error deploying into ap-southeast-4 #13

Closed oizik closed 2 weeks ago

oizik commented 10 months ago

Hi

I am getting an error deploying into ap-southeast-4 (Melbourne) region, as follows:

ImgTransformationStack: creating CloudFormation changeset...

 ❌  ImgTransformationStack failed: Error [ValidationError]: Template format error: Unrecognized resource types: [AWS::Lambda::Url]
    at Request.extractError (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:46430)
    at Request.callListeners (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:89985)
    at Request.emit (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:89433)
    at Request.emit (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:196191)
    at Request.transition (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:189743)
    at AcceptorStateMachine.runTo (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:154615)
    at /home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:154945
    at Request.<anonymous> (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:190035)
    at Request.<anonymous> (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:196266)
    at Request.callListeners (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:90153) {
  code: 'ValidationError',
  time: 2023-08-27T07:32:11.755Z,
  requestId: '45d325d0-72e4-4f41-9ade-3b692249843f',
  statusCode: 400,
  retryable: false,
  retryDelay: 506.6206886405491
}

 ❌ Deployment failed: Error [ValidationError]: Template format error: Unrecognized resource types: [AWS::Lambda::Url]
    at Request.extractError (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:46430)
    at Request.callListeners (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:89985)
    at Request.emit (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:89433)
    at Request.emit (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:196191)
    at Request.transition (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:189743)
    at AcceptorStateMachine.runTo (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:154615)
    at /home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:154945
    at Request.<anonymous> (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:190035)
    at Request.<anonymous> (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:196266)
    at Request.callListeners (/home/garyj/.nvm/versions/node/v18.16.0/lib/node_modules/aws-cdk/lib/index.js:338:90153) {
  code: 'ValidationError',
  time: 2023-08-27T07:32:11.755Z,
  requestId: '45d325d0-72e4-4f41-9ade-3b692249843f',
  statusCode: 400,
  retryable: false,
  retryDelay: 506.6206886405491
}

Template format error: Unrecognized resource types: [AWS::Lambda::Url]

The stack however deploys perfectly fine ap-southeast-2 (Sydney) region.

achrafsouk commented 10 months ago

Hello, I deployed it in Melbourne region without any issues. Please check your account permissions.

oizik commented 10 months ago

Not sure why, I have just tried again and still the same problem.

Using the same account and the same user and the same credentials I switch my deployment to ap-southeast-2 it works perfectly fine.

Very strange.

achrafsouk commented 6 months ago

hello, were you able to solve this issue?