Skip to content

Commit 3e55f3b

Browse files
GODRIVER-3560 Use lambda-specific arn for FaaS
1 parent 4c4cafc commit 3e55f3b

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

.evergreen/config.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,11 +1988,11 @@ tasks:
19881988
params:
19891989
working_dir: src/go.mongodb.org/mongo-driver
19901990
shell: bash
1991+
add_expansions_to_env: true
19911992
env:
19921993
TEST_LAMBDA_DIRECTORY: ${PROJECT_DIRECTORY}/internal/test/faas/awslambda
19931994
LAMBDA_STACK_NAME: dbx-go-lambda
19941995
AWS_REGION: us-east-1
1995-
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
19961996
script: |
19971997
${PREPARE_SHELL}
19981998
pushd $TEST_LAMBDA_DIRECTORY/mongodb
@@ -2357,7 +2357,10 @@ task_groups:
23572357
setup_group:
23582358
- func: fetch-source
23592359
- func: prepare-resources
2360-
- func: assume-test-secrets-ec2-role
2360+
- command: ec2.assume_role
2361+
params:
2362+
role_arn: ${LAMBDA_AWS_ROLE_ARN}
2363+
duration_seconds: 3600
23612364
- command: subprocess.exec
23622365
params:
23632366
working_dir: src/go.mongodb.org/mongo-driver
@@ -2375,6 +2378,7 @@ task_groups:
23752378
params:
23762379
working_dir: src/go.mongodb.org/mongo-driver
23772380
binary: bash
2381+
add_expansions_to_env: true
23782382
env:
23792383
LAMBDA_STACK_NAME: dbx-go-lambda
23802384
AWS_REGION: us-east-1

internal/test/faas/awslambda/template.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,6 @@ Resources:
3232
Variables:
3333
MONGODB_URI: !Ref MongoDbUri
3434

35-
ApplicationResourceGroup:
36-
Type: AWS::ResourceGroups::Group
37-
Properties:
38-
Name:
39-
Fn::Sub: ApplicationInsights-SAM-${AWS::StackName}
40-
ResourceQuery:
41-
Type: CLOUDFORMATION_STACK_1_0
42-
ApplicationInsightsMonitoring:
43-
Type: AWS::ApplicationInsights::Application
44-
Properties:
45-
ResourceGroupName:
46-
Ref: ApplicationResourceGroup
47-
AutoConfigurationEnabled: 'true'
48-
4935
Outputs:
5036
MongoDBApi:
5137
Description: "API Gateway endpoint URL for Prod stage for MongoDB function"

0 commit comments

Comments
 (0)