When developing web services on top of AWS infrastructure, we normally use serverless framework to manage cloudformation.
All resources on AWS have their unique identifiers called ARNs (Amazon Resource Names).
ARN consists of several information, including userId, region, resource specific strings.
It is quite a burden to manage all these ARNs created by other microservices in other microservice.
Cloudformation has output functionality to give an alias to ARN, so that we can easily give static alias and use in other microservices.
This functionality is available in serverless framework by output as well.
Outputs:
sendEmailArn:
Value:
Fn::Join:
- ':'
- - arn:aws:sns
- Ref: AWS::Region
- Ref: AWS::AccountId
- ${self:custom.prefix}-sendEmail
Export:
Name: ${self:custom.prefix}-sendEmailArn
Thanks, DunHao.