Can start using CI/CD with existing resources?

1

Hi, I'm fairly new to AWS and have created a solution the consists of 4 API endpoints, one S3 bucket, 6-7 lamda functions and 2 step functions. I use Git in VS code, but deploy everything with the AWS extension in VS code.

I'd like to start using SAM, Github actions and separate my dev,test, prod with Stacks. I see that Cloud Formation have a solution to import existing resources, but I can't find anything about SAM.

Is there a way I can merge my solution into SAM without starting from a blank template and manually create it?

  • it would help a lot if you post a diagram lets say with diagrams.net or a mermaid for markdown design. This way is easier to suggest ideas. One thing you could do is try the merge into SAM by leveraging AWS BedRock the AWS Titan LLM model

1 Answer
0

Hello.

AWS SAM cannot import existing resources from the management console.
So you need to import it using AWS CLI.
Please read the following document once.
https://repost.aws/knowledge-center/cloudformation-template-resources-error

  • Conditional resources. The resource that you're importing has a condition key associated with a condition that evaluates to false.
  • AWS Serverless Application Model (AWS SAM) templates. The AWS CloudFormation console doesn't support the Transforms section when importing resources. You can't import a resource with a template that uses the AWS::Serverless transform.
  • Fn::Transform. The AWS CloudFormation console doesn't support the use of the intrinsic function Fn::Transform when importing resources.

You can use the AWS Command Line Interface (AWS CLI) instead of the AWS CloudFormation console to resolve this error for templates using:

profile picture
EXPERT
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions