问题
Below is the SAM template that tries giving explicit name(some_name
) to restApi resource on AWS:
SampleApi:
Type: AWS::Serverless::Api
Properties:
Name: some_name
But I see the events in stack creation as:
User: arn:aws:sts::1111222333344:assumed-role/some-role/i-34454503ea88
is not authorized to perform:
apigateway:DELETE on resource: arn:aws:apigateway:us-east-1::/restapis/vxrf0gfs2a
where vxrf0gfs2a
is the random name of restApi
Cloudformation stack creates Api gateway with explicit name some_name
, but we . would like to have arn:aws:apigateway:us-east-1::/restapis/vxrf0gfs2a
with some explicit name arn:aws:apigateway:us-east-1::/restapis/some_explicit_name
How to give explicit name to AWS::Serveless:Api
's restapis
resource?
来源:https://stackoverflow.com/questions/57469442/how-to-create-predefined-restapi-resource-with-explicit-name