mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
Remove iamRoleARN support
This commit is contained in:
parent
305670f012
commit
f3c478b50b
@ -153,7 +153,7 @@ functions:
|
||||
memorySize: 512
|
||||
```
|
||||
|
||||
You can also use an existing IAM role by adding your IAM Role ARN in the `iamRoleARN` property. For example:
|
||||
You can also use an existing IAM role by adding your IAM Role ARN in the `role` property. For example:
|
||||
|
||||
```yml
|
||||
# serverless.yml
|
||||
@ -161,10 +161,10 @@ You can also use an existing IAM role by adding your IAM Role ARN in the `iamRol
|
||||
service: new-service
|
||||
provider:
|
||||
name: aws
|
||||
iamRoleARN: arn:aws:iam::YourAccountNumber:role/YourIamRole
|
||||
role: arn:aws:iam::YourAccountNumber:role/YourIamRole
|
||||
```
|
||||
|
||||
Support for separate IAM Roles per function is coming soon.
|
||||
See the documentation about [IAM](./iam.md) for function level IAM roles.
|
||||
|
||||
## VPC Configuration
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ module.exports = {
|
||||
}
|
||||
if (!anyFunctionHasNoRole) return BbPromise.resolve();
|
||||
|
||||
if (typeof this.serverless.service.provider.iamRoleARN !== 'string') {
|
||||
if (typeof this.serverless.service.provider.role !== 'string') {
|
||||
// merge in the iamRoleLambdaTemplate
|
||||
const iamRoleLambdaExecutionTemplate = this.serverless.utils.readFileSync(
|
||||
path.join(this.serverless.config.serverlessPath,
|
||||
|
||||
@ -112,27 +112,6 @@ describe('#mergeIamTemplates()', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should not add IamPolicyLambdaExecution if arn is provided', () => {
|
||||
awsDeploy.serverless.service.provider.iamRoleARN = 'some:aws:arn:xxx:*:*';
|
||||
|
||||
return awsDeploy.mergeIamTemplates()
|
||||
.then(() => expect(
|
||||
awsDeploy.serverless.service.provider.compiledCloudFormationTemplate
|
||||
.Resources.IamPolicyLambdaExecution
|
||||
).to.not.exist);
|
||||
});
|
||||
|
||||
|
||||
it('should not add IamRole if arn is provided', () => {
|
||||
awsDeploy.serverless.service.provider.iamRoleARN = 'some:aws:arn:xxx:*:*';
|
||||
|
||||
return awsDeploy.mergeIamTemplates()
|
||||
.then(() => expect(
|
||||
awsDeploy.serverless.service.provider.compiledCloudFormationTemplate
|
||||
.Resources.IamRoleLambdaExecution
|
||||
).to.not.exist);
|
||||
});
|
||||
|
||||
it('should add a CloudWatch LogGroup resource', () => {
|
||||
awsDeploy.serverless.service.provider.cfLogs = true;
|
||||
const normalizedName = `${functionName[0].toUpperCase()}${functionName.substr(1)}LogGroup`;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user