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

Unable to migrate Serverless function that references CodeUri S3 bucket #693

Open
steven10172 opened this issue Jun 13, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@steven10172
Copy link

When trying to migrate the following Serverless construct it failed with an error. Converting CodeUri to a string resolved the error and the migrate command continued as expected.

Construct:

  CheckMinimumCLIVersionLambdaFunction:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri:
        Bucket:
          Fn::Sub: ${S3BucketName}
        Key:
          Fn::Sub: ${S3KeyName}
      Handler: dist/admin/check-cli-version.handler
      MemorySize: 512
      Role:
        Fn::GetAtt: [CheckMinimumCLIVersionLambdaRole, Arn]
      Runtime: nodejs16.x
      Timeout: 60
      AutoPublishAlias: live
      Environment:
        Variables:
          ACCOUNT_ID:
            Ref: AWS::AccountId
          MASTER_REGION:
            Fn::Sub: ${MasterAccountRegion}

Error:

MyStack could not be generated because Some(Union(Static([Primitive(String), Named("AWS::Serverless::Function.S3Location")]))) is not implemented for ResourceValue::Object
@iph
Copy link
Collaborator

iph commented Sep 5, 2024

I would be shocked if any SAM things work! Going to assign this as an enhancement, as one can take a serverless transform output from CFN and then pipe it into cdk-from-cfn.

@iph iph added the enhancement New feature or request label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants