Christoffer Rehn
Christoffer Rehn
Relaying from #2418: > There's been a few similar requests (e.g. #413). We can't update the most straightforward way as it would be a backward incompatible change (would cause many...
Resolving in favor of https://github.com/aws/serverless-application-model/issues/660. It might also help to add `AWS::LanguageExtensions` to the `Transform` section, it'll automatically resolve intrinsic functions known before deployment. See #2533.
As mentioned in https://github.com/aws/serverless-application-model/issues/1320#issuecomment-845558908 (and others), this has to do with the underlying resource, and can be reproduced without SAM. SAM only transforms the template into CloudFormation, but doesn't otherwise...
> Hi @keetonian @dave-graham, was this ever added? It wasn't before you mentioned it, thanks. I've added support for it in https://github.com/aws/serverless-application-model/pull/3138; it'll roll out over the coming weeks.
If the issue is about the `SwaggerKey` not resolving, https://github.com/aws/serverless-application-model/issues/2533 should help (add `AWS::LanguageExtensions` to your `Transform`). Resolving in favor of https://github.com/aws/serverless-application-model/issues/660.
We document this usage here (also linked from the top of resource documentation): - `AWS::Serverless::Api`: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-generated-resources-api.html#sam-specification-generated-resources-api-domain-name - `AWS::Serverless::HttpApi`: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-generated-resources-httpapi.html#sam-specification-generated-resources-httpapi-domain-name So you can access attributes using e.g. `!GetAtt .DomainName.RegionalDomainName`.
This is now doable. Save the following as `template.yaml`: ```yaml Transform: - AWS::LanguageExtensions - AWS::Serverless-2016-10-31 Parameters: NeedBucket: Type: String Conditions: NeedBucketCondition: !Equals [!Ref NeedBucket, "yes"] Resources: MyBucket: Condition: NeedBucketCondition Type:...
One potential solution that would keep the transform deterministic would be to append a hash of the entire template and parameters to the API resource if a property is set...
I'm working on a draft PR in https://github.com/aws/serverless-application-model/pull/2935 that adds a new property `AlwaysDeploy` (disabled by default), which as the name suggests would _always_ redeploy the API, even when neither...
https://github.com/aws/serverless-application-model/pull/2935 has been merged and will roll out over the coming weeks.