基于Localstack的本地云服务编排

https://stackoverflow.com/questions/44547574/create-api-gateway-in-localstack/48682628

https://github.com/localstack/localstack/issues/632

AWS SAM is an extension for the AWS CloudFormation template language that lets you define serverless applications at a higher level

localstack default regrion

us-east-1

create stack

file path has to be in file URL format(file:///home/user/…)

func.yaml

AWSTemplateFormatVersion: '2010-09-09'
Description: Simple CloudFormation Test Template
Resources:
  S3Bucket:
    Type: AWS::S3::Bucket
    Properties:
      AccessControl: PublicRead
      BucketName: test-bucket-1
aws cloudformation create-stack --stack-name funstack --template-body file:///data/func.yaml --endpoint-url=http://localhost:4581 --region us-east-1
aws cloudformation describe-stacks  --endpoint-url=http://localhost:4581 --region us-east-1


Related