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

perage
已提问 5 个月前130 查看次数
1 回答
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
专家
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则