Closed nikhil-mongo closed 1 year ago
Hi-
Given that we see the error
FAILED Message: Resource Not Found
could you check that the MongoDB Atlas resources actually registered in this AWS region?
It's the RegisterAtlasResources
step in the "main" template. Since you are using the quickstart, the CFN private registry will be used.
To check this run, e.g.:
aws cloudformation list-types --visibility PRIVATE --region us-east-1
{
"TypeSummaries": [
{
"Type": "RESOURCE",
"TypeName": "MongoDB::Atlas::Cluster",
"DefaultVersionId": "00000002",
"TypeArn": "arn:aws:cloudformation:us-east-1:208629369896:type/resource/MongoDB-Atlas-Cluster",
"LastUpdated": "2021-09-08T14:32:49.912000+00:00",
"Description": "The cluster resource provides access to your cluster configurations. The resource lets you create, edit and delete clusters. The resource requires your Project ID."
},
{
"Type": "RESOURCE",
"TypeName": "MongoDB::Atlas::DatabaseUser",
"DefaultVersionId": "00000002",
"TypeArn": "arn:aws:cloudformation:us-east-1:208629369896:type/resource/MongoDB-Atlas-DatabaseUser",
"LastUpdated": "2021-09-08T14:32:56.247000+00:00",
"Description": "The databaseUsers resource lets you retrieve, create and modify the MongoDB users in your cluster. Each user has a set of roles that provide access to the project?s databases. A user?s roles apply to all the clusters in the project: if two clusters have a products database and a user has a role granting read access on the products database, the user has that access on both clusters."
},
{
"Type": "RESOURCE",
"TypeName": "MongoDB::Atlas::NetworkPeering",
"DefaultVersionId": "00000002",
"TypeArn": "arn:aws:cloudformation:us-east-1:208629369896:type/resource/MongoDB-Atlas-NetworkPeering",
"LastUpdated": "2021-09-08T14:32:49.843000+00:00",
"Description": "This resource allows to create, read, update and delete a network peering"
},
{
"Type": "RESOURCE",
"TypeName": "MongoDB::Atlas::Project",
"DefaultVersionId": "00000002",
"TypeArn": "arn:aws:cloudformation:us-east-1:208629369896:type/resource/MongoDB-Atlas-Project",
"LastUpdated": "2021-09-08T14:32:55.502000+00:00",
"Description": "Retrieves or creates projects in any given Atlas organization."
},
{
"Type": "RESOURCE",
"TypeName": "MongoDB::Atlas::ProjectIpAccessList",
"DefaultVersionId": "00000002",
"TypeArn": "arn:aws:cloudformation:us-east-1:208629369896:type/resource/MongoDB-Atlas-ProjectIpAccessList",
"LastUpdated": "2021-09-08T14:32:49.857000+00:00",
"Description": "An example resource schema demonstrating some basic constructs and validation rules."
}
]
}
Hi @nikhil-mongo - Are you still facing this issue? We have had reports of issues using the public registry, however privately deploying the resources should be working. Please let us know - thanks.
Hi @jasonmimick What do you mean by public/private registry? How can I configure it with this quickstart? I'm facing the same issue. The same fail as above, however I can see it in resources:
{
"Type": "RESOURCE",
"TypeName": "MongoDB::Atlas::Project",
"DefaultVersionId": "00000010",
"TypeArn": "arn:aws:cloudformation:eu-west-1:********:type/resource/MongoDB-Atlas-Project",
"LastUpdated": "2021-12-15T17:49:17.451000+00:00",
"Description": "Retrieves or creates projects in any given Atlas organization."
}
Can you help me with resolving it?
Nevermind, I found out that the issue was wrong permission on the Atlas organization
Hi @JakubJakubowski8 - Thanks good to know. fwiw - here's a link on the CFN registry stuff - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html It's still a bit complex, since the actually quickstart does not yet use the Public Registry. If you have questions, feel free to email me at jason.mimick@mongodb.com Thanks- Jason
Hi @JakubJakubowski8. I am having the same problem and believe I have the permissions on the org. set correctly. Can you share how you resolved this?
Hi @rduffr , I've added those permissions: Organization Project Creator, Organization Member, Organization Owner
Also, I remember that I had the same problem when a project on Atlas was already created. If I've let AWS quickstart to create a project on MongoDB Atlas then it was working fine.
Same here, the MongoDB::Atlas::Project resource fails with this error
Resource handler returned message: "Resource Not Found" (RequestToken: 8a52e7e5-bb86-6ccb-42c7-04698e2b44dd, HandlerErrorCode: InvalidRequest)
The used api keys have all the rights (Organization Project Creator, Organization Member, Organization Owner) and i'm trying to deploy in eu-west-1.
The resources are registered, this is the output of
aws cloudformation list-types --visibility PRIVATE --region eu-west-1
{
"TypeSummaries": [
{
"Type": "RESOURCE",
"TypeName": "MongoDB::Atlas::Cluster",
"DefaultVersionId": "00000003",
"TypeArn": "arn:aws:cloudformation:eu-west-1:030800513199:type/resource/MongoDB-Atlas-Cluster",
"LastUpdated": "2022-03-02T08:55:47.146000+00:00",
"Description": "The cluster resource provides access to your cluster configurations. The resource lets you create, edit and delete clusters. The resource requires your Project ID."
},
{
"Type": "RESOURCE",
"TypeName": "MongoDB::Atlas::DatabaseUser",
"DefaultVersionId": "00000003",
"TypeArn": "arn:aws:cloudformation:eu-west-1:030800513199:type/resource/MongoDB-Atlas-DatabaseUser",
"LastUpdated": "2022-03-02T08:56:02.591000+00:00",
"Description": "The databaseUsers resource lets you retrieve, create and modify the MongoDB users in your cluster. Each user has a set of roles that provide access to the project?s databases. A user?s roles apply to all the clusters in the project: if two clusters have a products database and a user has a role granting read access on the products database, the user has that access on both clusters."
},
{
"Type": "RESOURCE",
"TypeName": "MongoDB::Atlas::NetworkPeering",
"DefaultVersionId": "00000003",
"TypeArn": "arn:aws:cloudformation:eu-west-1:030800513199:type/resource/MongoDB-Atlas-NetworkPeering",
"LastUpdated": "2022-03-02T08:55:46.675000+00:00",
"Description": "This resource allows to create, read, update and delete a network peering"
},
{
"Type": "RESOURCE",
"TypeName": "MongoDB::Atlas::Project",
"DefaultVersionId": "00000003",
"TypeArn": "arn:aws:cloudformation:eu-west-1:030800513199:type/resource/MongoDB-Atlas-Project",
"LastUpdated": "2022-03-02T08:55:52.458000+00:00",
"Description": "Retrieves or creates projects in any given Atlas organization."
},
{
"Type": "RESOURCE",
"TypeName": "MongoDB::Atlas::ProjectIpAccessList",
"DefaultVersionId": "00000003",
"TypeArn": "arn:aws:cloudformation:eu-west-1:030800513199:type/resource/MongoDB-Atlas-ProjectIpAccessList",
"LastUpdated": "2022-03-02T08:55:52.507000+00:00",
"Description": "An example resource schema demonstrating some basic constructs and validation rules."
},
{
"Type": "RESOURCE",
"TypeName": "MongoDb::Atlas::DatabaseUser",
"TypeArn": "arn:aws:cloudformation:eu-west-1:030800513199:type/resource/MongoDb-Atlas-DatabaseUser",
"LastUpdated": "2022-02-28T09:31:05.610000+00:00",
"Description": "CRUD the MongoDB users in your project for your clusters/databases.",
"PublisherId": "9331cf547939e23b9c7f24086db031317893be87",
"OriginalTypeName": "MongoDb::Atlas::DatabaseUser"
}
]
}
In cloudwatch I found this error many times:
{
"level": "error",
"msg": "getLogLevel() Environment variable 'LOG_LEVEL' not found. Set it in template.yaml (defaultLogLevel=info)",
"time": "2022-03-02T08:04:49Z"
}
I found that changing the VPC peering CIDR block it works for new projects, but still it does not work for already existing projects.
Did you check and make sure to add the IPs from AWS to the AccessList for your MongoDB Atlas ApiKeys. There's a helper here.
When you "activate" (or old way cfn submit
) each resource gets deployed as a Lambda function in that particular region. The ip address of these machines is impossible to know a priori. Best solution for far, unless MDB will be able to figure out it's an AWS ip, is to brute force add all the published ip ranges. However, this is a major security gap imho.
Hope this helps.
I added all permissions for my key and I still receive such error...any idea on how to pass through it?
Template format error: Unrecognized resource types: [MongoDB::Atlas::Project, MongoDB::Atlas::DatabaseUser, MongoDB::Atlas::Cluster, MongoDB::Atlas::
ProjectIpAccessList]
Did you check and make sure to add the IPs from AWS to the AccessList for your MongoDB Atlas ApiKeys. There's a helper here.
When you "activate" (or old way
cfn submit
) each resource gets deployed as a Lambda function in that particular region. The ip address of these machines is impossible to know a priori. Best solution for far, unless MDB will be able to figure out it's an AWS ip, is to brute force add all the published ip ranges. However, this is a major security gap imho. Hope this helps.
Is this AccessList required? I thought if the AccessList was empty then the API key would be valid for incoming calls from all IP Addresses?
I'm using the Deploy MongoDB Atlas with VPC peering into an existing VPC template to deploy the mongodb ATlas on AWS with VPC peering into existing VPC. I'm getting an error :
2022-11-11 15:23:55 UTC-0600 | AtlasProject | -- | -- | Resource handler returned message: "Resource Not Found" (RequestToken: e7b9edd7-a9bf-d3de-5163-4c06ea09a843, HandlerErrorCode: InvalidRequest)
I checked the cloudformation template, and the resource AtlasProject is not present. This is the same case for any of the template present at https://aws-quickstart.github.io/quickstart-mongodb-atlas/
Has anybody faced this issue ? What is the solution please ?
I facing the same issues as JanhaviPalande. Does anyone have a solution?
I have the same issue when I deploy via 'Deploy MongoDB Atlas without VPC peering' template. Any update?
aws cloudformation list-types --visibility PRIVATE --region us-east-1
{
"TypeSummaries": [{
"Type": "RESOURCE",
"TypeName": "MongoDB::Atlas::Cluster",
"DefaultVersionId": "00000006",
"TypeArn": "arn:aws:cloudformation:us-east-1:558846430793:type/resource/MongoDB-Atlas-Cluster",
"LastUpdated": "2023-01-18T05:02:01.705000+00:00",
"Description": "The cluster resource provides access to your cluster configurations. The resource lets you create, edit and delete clusters. The resource requires your Project ID."
}, {
"Type": "RESOURCE",
"TypeName": "MongoDB::Atlas::DatabaseUser",
"DefaultVersionId": "00000007",
"TypeArn": "arn:aws:cloudformation:us-east-1:558846430793:type/resource/MongoDB-Atlas-DatabaseUser",
"LastUpdated": "2023-01-18T05:01:56.006000+00:00",
"Description": "The databaseUsers resource lets you retrieve, create and modify the MongoDB users in your cluster. Each user has a set of roles that provide access to the project?s databases. A user?s roles apply to all the clusters in the project: if two clusters have a products database and a user has a role granting read access on the products database, the user has that access on both clusters."
}, {
"Type": "RESOURCE",
"TypeName": "MongoDB::Atlas::NetworkPeering",
"DefaultVersionId": "00000007",
"TypeArn": "arn:aws:cloudformation:us-east-1:558846430793:type/resource/MongoDB-Atlas-NetworkPeering",
"LastUpdated": "2023-01-18T05:01:56.384000+00:00",
"Description": "This resource allows to create, read, update and delete a network peering"
}, {
"Type": "RESOURCE",
"TypeName": "MongoDB::Atlas::Project",
"DefaultVersionId": "00000007",
"TypeArn": "arn:aws:cloudformation:us-east-1:558846430793:type/resource/MongoDB-Atlas-Project",
"LastUpdated": "2023-01-18T05:01:56.219000+00:00",
"Description": "Retrieves or creates projects in any given Atlas organization."
}, {
"Type": "RESOURCE",
"TypeName": "MongoDB::Atlas::ProjectIpAccessList",
"DefaultVersionId": "00000007",
"TypeArn": "arn:aws:cloudformation:us-east-1:558846430793:type/resource/MongoDB-Atlas-ProjectIpAccessList",
"LastUpdated": "2023-01-18T05:02:46.685000+00:00",
"Description": "An example resource schema demonstrating some basic constructs and validation rules."
}]
}
This is no longer relevant, the solution has been updated to use MongoDB 3rd Party resources from the CloudFormation registry.
Template used - https://fwd.aws/p5EpP and https://fwd.aws/5j8rk
Error -
Cloudwatch error -
Please let me know if I need to share more logs or details and/or anything I am not doing as expected to create this stack.