Giter Club home page Giter Club logo

Comments (15)

limulus avatar limulus commented on September 13, 2024 11

I’m not sure what the exact problem with the above template is, but I just wanted to chime in on this issue to say that I ran into the “Internal transform failure” a bunch at first too. As it turned out, I had a number of misspellings in my YAML keys, but for a long while I wasn’t sure if something with this new feature was broken in CloudFormation.

It’d be nice if the code that raises this error could provide a better error message. (Ideally with line numbers and such.) And it would be even better if the aws cloudformation validate-template command would run it past the code that raises this error too. 😄

from serverless-application-model.

kjenney avatar kjenney commented on September 13, 2024 9

It's 2019 and I just ran into the same issue. No descriptive error, just

FAILED. Reason: Transform AWS::Serverless-2016-10-31 failed with: Internal transform failure.

from serverless-application-model.

sanathkr avatar sanathkr commented on September 13, 2024 5

Glad you found the issue. And sorry the error message wasn't too clear.

I have marked this as a bug to fix the error messaging when we receive an unexpected property

from serverless-application-model.

sanathkr avatar sanathkr commented on September 13, 2024 2

This issue should be fixed now. You will see a more descriptive error message now

from serverless-application-model.

keetonian avatar keetonian commented on September 13, 2024 1

Yeah, a lot of those recently have been with something in the Events section. Thanks for the reply!

from serverless-application-model.

sanathkr avatar sanathkr commented on September 13, 2024

Can you post the YAML file with proper formatting & spaces? That will help me figure out if your template has an issue (use the codeblock markdown syntax)

from serverless-application-model.

VanOvermeire avatar VanOvermeire commented on September 13, 2024
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31

Resources:
  MySimpleSlackFunction:
    Type: AWS::Serverless::Function
    Properties:
      Handler: example.my_handler
      Runtime: Python 2.7
      CodeUri: s3://my-bucket/lambda-zips/myzip.zip
      Role: arn:aws:iam:...:role/lambdaAccess
      Environment:
        Variables:
          CODE: acode
      Events:
        MyUploadEvent:
          Type: Schedule
          Properties:
            Schedule: cron(45 10 ? * MON-FRI *)
            Events: {"example": "hello world" }

(I added the CODE variable yesterday, doesn't change anything about the error.)

from serverless-application-model.

VanOvermeire avatar VanOvermeire commented on September 13, 2024

Ok, so I played around with the YAML for a bit (after the comment from limulus). Mistake was in the Events section: the property "Events" should have been "Input". :-\

So I guess this issue can be closed. Though I hope error messages will become somewhat more informative. :-)

from serverless-application-model.

jniedrauer avatar jniedrauer commented on September 13, 2024

Just hit this myself. No way to tell what the error is.

from serverless-application-model.

keetonian avatar keetonian commented on September 13, 2024

It's some uncaught error; I agree that this isn't the best experience. We are starting to root cause and fix some of these. In the meantime, open an issue with an example template that causes the error or reach out on slack and we can work through the issue.

from serverless-application-model.

jniedrauer avatar jniedrauer commented on September 13, 2024

@keetonian I had a field named ScheduleExpression instead of Schedule. I was able to figure it out by comparing line by line against the examples. No longer an issue for me, but hopefully this helps you cross another one off the list.

from serverless-application-model.

whimzyLive avatar whimzyLive commented on September 13, 2024

Getting the same error here while using Fn:ImportValue under Events:

  GetDataFromLedger:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: ./main
      Handler: bundle.GetDataFromLedger
      Events:
        getDataApi:
          Type: Api
          Properties:
            Path: /ledger/transaction/{id}
            Method: GET
            RestApiId:
              Fn::ImportValue: !Sub '${env}-${some-exported-name}'

from serverless-application-model.

pam81 avatar pam81 commented on September 13, 2024

I had same issue but It was because the yaml was not a valid one. Extra spaces at the end of line and no correct alignment

from serverless-application-model.

crwgregory avatar crwgregory commented on September 13, 2024

Had the same error, thanks to this thread was able to find and fix the issue.
I had:

Resources:
  # API DEFINITIONS #
  ApiDefinition:
    Type: AWS::Serverless::Api
    Properties:
      StageName: !Ref Deployment
      TracingEnabled: True
      Models:
        AzureRequest:
          Request:
            type: object
            required:
              - id
              - action
            properties:
              id:
                type: string
              action:
                type: string

But I had one too many nested properties in my Models definition after AzureRequest. It should have been:

Resources:
  # API DEFINITIONS #
  ApiDefinition:
    Type: AWS::Serverless::Api
    Properties:
      StageName: !Ref Deployment
      TracingEnabled: True
      Models:
        AzureRequest:
          type: object
          required:
            - id
            - action
          properties:
            id:
              type: string
            action:
              type: string

from serverless-application-model.

BhrikutyAggarwal avatar BhrikutyAggarwal commented on September 13, 2024

I have got into similar kind of issue while trying to update the CloudFormation stack (using CLI) to perform ECS blue/green deployments through CodeDeploy:

Failed to create the changeset: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state Status: FAILED. Reason: Template parameters modified by transform

Getting similar issue while updating it via AWS console also:
'CodeDeployBlueGreenHook' of type AWS::CodeDeploy::BlueGreen failed with message: java.lang.Object cannot be cast to java.util.Collection

Could not resolve it. If anyone has any idea?

from serverless-application-model.

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.