Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to dynamically get ARN, and also compose multiple component yml files together? #9

Open
Suedo opened this issue Jun 24, 2020 · 0 comments

Comments

@Suedo
Copy link

Suedo commented Jun 24, 2020

Currently, I am creating a Role for a DynamoDB table that i defined elsewhere using the component aws-dynamodb.
In my aws-iam-role yml file, I am defining the Dynamo DB Resource as:

      Resource:
        - arn:aws:dynamodb:${env:AWS_REGION}:*:table/backend-db-${env.STAGE}
        - arn:aws:dynamodb:${env:AWS_REGION}:*:table/backend-db-${env.STAGE}/index/*

I just found out that we can't use plugins, but how about CLoudformation !REF or !GetAtt to make things more dynamic?

Also, how do I compose multiple serverless-component's yml files together as one ? My basic serverless express project's tree looks like this at the moment:

.
├── ./app.js
├── ./package.json
├── ./permissions
│   └── ./permissions/serverless.yml
├── ./resources
│   └── ./resources/serverless.yml
├── ./serverless.yml
├── ./src
│   ├── ./src/handlers.ts
│   └── ./src/index.ts
├── ./tsconfig.json
└── ./yarn.lock

As you can see, I have multiple serverless.yml files for each of the components I am using (express, IAM, DynamoDB) . How do I compose these together?

@Suedo Suedo changed the title How to give a custom Resource ARN How to give a custom Resource ARN, and compose multiple component yml files together? Jun 25, 2020
@Suedo Suedo changed the title How to give a custom Resource ARN, and compose multiple component yml files together? How to dynamically get ARN, and also compose multiple component yml files together? Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant