Amazon API Gateway Deployment with CloudFormation: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
Line 53: Line 53:
       RestApiId: !Ref Api
       RestApiId: !Ref Api
       DeploymentId: !Ref ApiDeployment
       DeploymentId: !Ref ApiDeployment


==AWS::ApiGateway::VpcLink==
==AWS::ApiGateway::VpcLink==
{{External|[https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-vpclink.html AWS::ApiGateway::VpcLink]}}
{{External|[https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-vpclink.html AWS::ApiGateway::VpcLink]}}
=Idiosyncrasy=
As per March 2019, an attempt to re-deploy a new version of an API, as expressed in a version of an Open API file, with CloudFormation, does not work as expected.


=Organizatorium=
=Organizatorium=


Simply changing the description of a Deployment does not triggers redeployment. Need a better mechanism.
Simply changing the description of a Deployment does not triggers redeployment. Need a better mechanism.

Revision as of 21:17, 21 March 2019

External

Internal

Overview

Resource Types

AWS::ApiGateway::RestApi

AWS::ApiGateway::RestApi
Resources:
  Api:
    Type: AWS::ApiGateway::RestApi
    Properties:
      Name: 'experimental-api'
      Description: 'An experimental API, deployed programmatically'
      FailOnWarnings: true
      BodyS3Location:
        Bucket: 'ovidiu-experiments'
        Key: 'openapi-aws.json'

AWS::ApiGateway::Deployment

AWS::ApiGateway::Deployment
Resources:
 ApiDeployment:
   Type: AWS::ApiGateway::Deployment
   DependsOn: Api
   Properties:
     RestApiId: !Ref Api
     Description: 'something'

AWS::ApiGateway::Stage

AWS::ApiGateway::Stage
Resources:
  Stage:
    Type: AWS::ApiGateway::Stage
    DependsOn:
      - Api
      - ApiDeployment
    Properties:
      StageName: 'dev'
      RestApiId: !Ref Api
      DeploymentId: !Ref ApiDeployment

AWS::ApiGateway::VpcLink

AWS::ApiGateway::VpcLink

Idiosyncrasy

As per March 2019, an attempt to re-deploy a new version of an API, as expressed in a version of an Open API file, with CloudFormation, does not work as expected.

Organizatorium

Simply changing the description of a Deployment does not triggers redeployment. Need a better mechanism.