diff --git a/samconfig.toml b/samconfig.toml index 57855bb..281ab53 100644 --- a/samconfig.toml +++ b/samconfig.toml @@ -2,8 +2,7 @@ version = 0.1 [default] [default.deploy] [default.deploy.parameters] +s3_bucket = "aws-sam-cli-managed-default-samclisourcebucket-b5rkcqqppiqc" region = "us-east-2" confirm_changeset = true -capabilities = "CAPABILITY_IAM" -parameter_overrides = "Environment=\"stage\"" - +capabilities = "CAPABILITY_IAM" \ No newline at end of file diff --git a/template.yaml b/template.yaml index 3ac457f..ead38e9 100644 --- a/template.yaml +++ b/template.yaml @@ -27,6 +27,8 @@ Globals: Resources: ServerlessHTTPApi: Type: AWS::Serverless::HttpApi + Properties: + StageName: !Sub "${Environment}" HelloWorldFunction: Type: AWS::Serverless::Function @@ -45,7 +47,11 @@ Resources: Outputs: HelloWorldApi: Description: "API Gateway endpoint URL for Prod stage for Hello World function" - Value: !Sub "https://${ServerlessHTTPApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/" + Value: !Join + - '' + - - !Sub "https://${ServerlessHTTPApi}.execute-api.${AWS::Region}.amazonaws.com/" + - !If [ProdCondition, "prod", "stage"] + HelloWorldFunction: Description: "Hello World Lambda Function ARN" Value: !GetAtt HelloWorldFunction.Arn