8
8
- [ Migration] ( #migration )
9
9
- [ 0.x or 1.x -\> 2.x] ( #0x-or-1x---2x )
10
10
- [ Fine-grained Access Control] ( #fine-grained-access-control )
11
+ - [ Enabling Post-ingest SNS publishing] ( #enabling-post-ingest-sns-publishing )
11
12
- [ 0.4.x -\> 0.5.x] ( #04x---05x )
12
13
- [ Elasticsearch to OpenSearch Migration] ( #elasticsearch-to-opensearch-migration )
13
14
- [ Preferred Elasticsearch to OpenSearch Migration Process] ( #preferred-elasticsearch-to-opensearch-migration-process )
@@ -135,6 +136,49 @@ As of 2.0.0, only OpenSearch is supported and only using fine-grained access con
135
136
It is recommended to follow the migration path to upgrade to fine-grained access control
136
137
first and then upgrade to stac-server 2.x.
137
138
139
+ #### Enabling Post-ingest SNS publishing
140
+
141
+ stac-server now has the ability to publish all ingested entities (Items and Collections)
142
+ to an SNS topic. Follow these steps to add this to an existing deployment. These
143
+ configurations are also in the serverless.example.yml file, so reference that if it is
144
+ unclear exactly where to add this in your config.
145
+
146
+ The following changes should be added to the serverless.yml file.
147
+
148
+ Explicitly set the provider/environment setting for STAC_API_URL so the ingested entities
149
+ published to the topic will have their link hrefs set correctly. If this is not set,
150
+ the entities will still be published, with with incorrect link hrefs.
151
+
152
+ ``` text
153
+ STAC_API_URL: "https://some-stac-server.com"
154
+ ```
155
+
156
+ Add the SNS topic resource:
157
+
158
+ ``` text
159
+ postIngestTopic:
160
+ Type: AWS::SNS::Topic
161
+ Properties:
162
+ TopicName: ${self:service}-${self:provider.stage}-post-ingest
163
+ ```
164
+
165
+ For the ` ingest ` Lambda resource definition, configure the ARN to publish to by adding:
166
+
167
+ ``` text
168
+ environment:
169
+ POST_INGEST_TOPIC_ARN: !Ref postIngestTopic
170
+ ```
171
+
172
+ Add IAM permissions with the statement:
173
+
174
+ ``` text
175
+ - Effect: Allow
176
+ Action:
177
+ - sns:Publish
178
+ Resource:
179
+ Fn::GetAtt: [postIngestTopic, TopicArn]
180
+ ```
181
+
138
182
### 0.4.x -> 0.5.x
139
183
140
184
#### Elasticsearch to OpenSearch Migration
@@ -521,11 +565,9 @@ aws lambda invoke \
521
565
/dev/stdout
522
566
` ` `
523
567
524
- Stac-server is now ready to ingest data!
525
-
526
568
# ### OpenSearch fine-grained access control
527
569
528
- As of version 2.0.0, stac-server on"ly supports fine-grained access control to
570
+ As of version 2.0.0, stac-server only supports fine-grained access control to
529
571
OpenSearch, and no longer supports "AWS Connection" mode.
530
572
531
573
**Warning**: Unfortunately, fine-grained access control cannot be enabled on an
@@ -634,8 +676,8 @@ so that stac-server can access them.
634
676
The preferred mechanism for populating the OpenSearch credentials to stac-server is to
635
677
create a secret in AWS Secret Manager that contains the username and password. The
636
678
recommended name for this Secret corresponds
637
- to the stac-server deployment as `{stage}/{service}/ opensearch`, e.g.,
638
- ` dev/ my-stac-server/ opensearch` .
679
+ to the stac-server deployment as `${service}-${stage}- opensearch-user-creds `, e.g.,
680
+ ` my-stac-server-dev- opensearch-user-creds ` .
639
681
640
682
The Secret type should be "Other type of secret" and
641
683
have two keys, `username` and `password`, with the appropriate
@@ -645,14 +687,14 @@ Add the `OPENSEARCH_CREDENTIALS_SECRET_ID` variable to the serverless.yml sectio
645
687
`environment` :
646
688
647
689
` ` ` yaml
648
- OPENSEARCH_CREDENTIALS_SECRET_ID: ${self:provider.stage}/ ${self:service}/ opensearch
690
+ OPENSEARCH_CREDENTIALS_SECRET_ID: ${self:service}- ${self:provider.stage}- opensearch-user-creds
649
691
` ` `
650
692
651
693
Add to the IAM Role Statements :
652
694
653
695
` ` ` yaml
654
- - Effect: " Allow"
655
- Resource: " arn:aws:secretsmanager:${aws:region}:${aws:accountId}:secret:${self:provider.stage}/${self:service}/opensearch-*"
696
+ - Effect: Allow
697
+ Resource: arn:aws:secretsmanager:${aws:region}:${aws:accountId}:secret:${self:provider.environment.OPENSEARCH_CREDENTIALS_SECRET_ID}-*
656
698
Action: "secretsmanager:GetSecretValue"
657
699
` ` `
658
700
@@ -674,6 +716,8 @@ OPENSEARCH_PASSWORD: xxxxxxxxxxx
674
716
Setting these as environment variables can also be useful when running stac-server
675
717
locally.
676
718
719
+ Stac-server is now ready to ingest data!
720
+
677
721
# ## Proxying Stac-server through CloudFront
678
722
679
723
The API Gateway URL associated with the deployed stac-server instance may not be the URL that you ultimately wish to expose to your API users. AWS CloudFront can be used to proxy to a more human readable URL. In order to accomplish this :
0 commit comments